[xiph-cvs] cvs commit: icecast/src connection.c
Michael Smith
msmith at xiph.org
Fri Mar 7 21:02:13 PST 2003
msmith 03/03/08 00:02:13
Modified: src connection.c
Log:
create /icy_0 (and incrementing numbers) for incoming icy protocol connections
if the / mountpoint is taken
Revision Changes Path
1.61 +12 -1 icecast/src/connection.c
Index: connection.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/connection.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- connection.c 8 Mar 2003 04:57:02 -0000 1.60
+++ connection.c 8 Mar 2003 05:02:13 -0000 1.61
@@ -872,7 +872,18 @@
}
else if(httpp_parse_icy(parser, header, strlen(header))) {
/* TODO: Map incoming icy connections to /icy_0, etc. */
- _handle_source_request(con, parser, "/");
+ char mount[20];
+ int i = 0;
+
+ strcpy(mount, "/");
+
+ avl_tree_rlock(global.source_tree);
+ while(source_find_mount(mount) != NULL) {
+ sprintf(mount, "/icy_%d", i++);
+ }
+ avl_tree_unlock(global.source_tree);
+
+ _handle_source_request(con, parser, mount);
}
else {
ERROR0("HTTP request parsing failed");
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list