[xiph-commits] r7439 - icecast/trunk/icecast/src

oddsock at motherfish-iii.xiph.org oddsock
Thu Aug 5 19:05:50 PDT 2004


Author: oddsock
Date: Thu Aug  5 19:05:50 2004
New Revision: 7439

Modified:
icecast/trunk/icecast/src/connection.c
Log:
fix m3u generation logic that was not working for static files


Modified: icecast/trunk/icecast/src/connection.c
===================================================================
--- icecast/trunk/icecast/src/connection.c	2004-07-31 21:59:31 UTC (rev 7438)
+++ icecast/trunk/icecast/src/connection.c	2004-07-31 22:25:07 UTC (rev 7439)
@@ -841,11 +841,8 @@
char *sourceuri = strdup(uri);
char *dot = strrchr(sourceuri, '.');
*dot = 0;
-        avl_tree_rlock(global.source_tree);
-        source = source_find_mount(sourceuri);
-           if (source) {
-            client->respcode = 200;
-            bytes = sock_write(client->con->sock,
+        client->respcode = 200;
+        bytes = sock_write(client->con->sock,
"HTTP/1.0 200 OK\r\n"
"Content-Type: audio/x-mpegurl\r\n\r\n"
"http://%s:%d%s\r\n",
@@ -853,33 +850,8 @@
port,
sourceuri
);
-            if(bytes > 0) client->con->sent_bytes = bytes;
-            client_destroy(client);
-        }
-        else if(fileserve) {
-            fullpath = util_get_path_from_normalised_uri(sourceuri);
-            if(stat(fullpath, &statbuf) == 0) {
-                fserve_client_create(client, fullpath);
-                free(fullpath);
-            }
-            else {
-                free(fullpath);
-                fullpath = util_get_path_from_normalised_uri(uri);
-                if(stat(fullpath, &statbuf) == 0) {
-                    fserve_client_create(client, fullpath);
-                    free(fullpath);
-                }
-                else {
-                    free(fullpath);
-                    client_send_404(client,
-                            "The file you requested could not be found");
-                }
-            }
-        }
-        else {
-            client_send_404(client, "The file you requested could not be found");
-        }
-        avl_tree_unlock(global.source_tree);
+        if(bytes > 0) client->con->sent_bytes = bytes;
+        client_destroy(client);
free(sourceuri);
return;
}



More information about the commits mailing list