[MPlayer-cvslog] CVS: main/libmpdemux asf_streaming.c,1.55,1.56

Reimar Döffinger CVS syncmail at mplayerhq.hu
Tue Jul 26 20:55:23 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv6980

Modified Files:
	asf_streaming.c 
Log Message:
strncasecmp is not necessary and e.g. strncasecmp(prot, "mms", 3) will
also match e.g. mmshttp!
Thanks to Ian Remmler for noticing.


Index: asf_streaming.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/asf_streaming.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- asf_streaming.c	3 Jun 2005 15:33:25 -0000	1.55
+++ asf_streaming.c	26 Jul 2005 18:55:20 -0000	1.56
@@ -51,7 +51,7 @@
     int port = stream->streaming_ctrl->url->port;
 
     // Is protocol mms or mmsu?
-    if (!strncasecmp(proto, "mmsu", 4) || !strncasecmp(proto, "mms", 3))
+    if (!strcasecmp(proto, "mmsu") || !strcasecmp(proto, "mms"))
     {
 		mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/UDP...\n");
 		//fd = asf_mmsu_streaming_start( stream );
@@ -61,7 +61,7 @@
 	}
 
     //Is protocol mms or mmst?
-    if (!strncasecmp(proto, "mmst", 4) || !strncasecmp(proto, "mms", 3))
+    if (!strcasecmp(proto, "mmst") || !strcasecmp(proto, "mms"))
     {
 		mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/TCP...\n");
 		fd = asf_mmst_streaming_start( stream );
@@ -72,8 +72,8 @@
 	}
 
     //Is protocol http, http_proxy, or mms? 
-    if (!strncasecmp(proto, "http_proxy", 10) || !strncasecmp(proto, "http", 4) ||
-	!strncasecmp(proto, "mms", 3) || !strncasecmp(proto, "mmshttp", 7))
+    if (!strcasecmp(proto, "http_proxy") || !strcasecmp(proto, "http") ||
+	!strcasecmp(proto, "mms") || !strcasecmp(proto, "mmshttp"))
     {
 		mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/HTTP...\n");
 		fd = asf_http_streaming_start( stream, demuxer_type );




More information about the MPlayer-cvslog mailing list