[xiph-commits] r11586 - trunk/icecast2yp/src
giles at svn.xiph.org
giles at svn.xiph.org
Sun Jun 18 22:13:14 PDT 2006
Author: giles
Date: 2006-06-18 22:13:13 -0700 (Sun, 18 Jun 2006)
New Revision: 11586
Modified:
trunk/icecast2yp/src/yp_cgi.c
Log:
Only reject streams by mimetype when that cgi parameter is present.
Previously we were preventing updates and removes which generally
leave that parameter blank. Thanks to Karl Heyes for the fix.
Modified: trunk/icecast2yp/src/yp_cgi.c
===================================================================
--- trunk/icecast2yp/src/yp_cgi.c 2006-06-18 19:44:46 UTC (rev 11585)
+++ trunk/icecast2yp/src/yp_cgi.c 2006-06-19 05:13:13 UTC (rev 11586)
@@ -172,9 +172,14 @@
Log(LOG_DEBUG, "Getting Server Type");
if (strlen(cgi_param("type")) > 0) {
ptmp = cgi_unescape_special_chars(cgi_param("type"));
- if (ptmp) {
+ if (ptmp) {
strncpy(server_type, ptmp, sizeof(server_type)-1);
free(ptmp);
+ Log(LOG_DEBUG, "Limiting by stream mime-type");
+ if (strncmp(server_type, "application/ogg", strlen("application/ogg"))) {
+ sendYPResponse(0, "We only accept Ogg stream listings", ICECAST2_RESPONSE);
+ goto endofcall;
+ }
}
}
}
@@ -310,18 +315,13 @@
}
}
Log(LOG_DEBUG, "Done getting parameters");
- Log(LOG_DEBUG, "Limiting by stream mime-type");
- if (strncmp(server_type, "application/ogg", strlen("application/ogg"))) {
- sendYPResponse(0, "We only accept Ogg stream listings", ICECAST2_RESPONSE);
- goto endofcall;
- }
res = connectToDB();
if (!res) {
sendYPResponse(0, "Error connecting to database", ICECAST2_RESPONSE);
goto endofcall;
}
- Log(LOG_DEBUG, "Connected to DB");
+ Log(LOG_DEBUG, "Connected to DB");
if (action == ADD) {
Log(LOG_DEBUG, "Checking server name");
More information about the commits
mailing list