]> git.sesse.net Git - vlc/commitdiff
* SAP can now handle SAP-announced IPv6 streams
authorClément Stenac <zorglub@videolan.org>
Mon, 16 Jun 2003 15:39:11 +0000 (15:39 +0000)
committerClément Stenac <zorglub@videolan.org>
Mon, 16 Jun 2003 15:39:11 +0000 (15:39 +0000)
modules/misc/sap.c

index 1bcb7e6b027726c6aae5a84641ff69358b7b6dfb..ebb4503e7ef5ec3162fb056dd09535a93480c400 100644 (file)
@@ -2,7 +2,7 @@
  * sap.c :  SAP interface module
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: sap.c,v 1.11 2003/05/25 18:02:20 nitrox Exp $
+ * $Id: sap.c,v 1.12 2003/06/16 15:39:11 zorglub Exp $
  *
  * Authors: Arnaud Schauly <gitan@via.ecp.fr>
  *
@@ -668,7 +668,7 @@ static void free_sd( sess_descr_t * p_sd )
 }
 
 /***********************************************************************
- * ismult
+ * ismult: returns true if we have a multicast address
  ***********************************************************************/
 
 static int ismult( char *psz_uri )
@@ -678,10 +678,11 @@ static int ismult( char *psz_uri )
 
     i_value = strtol( psz_uri, &psz_end, 0 );
 
-    if( *psz_end != '.' )
-    {
-        return( VLC_FALSE );
-    }
+    /* FIXME: This is an ugly way to detect IPv6 and to say that this is
+multicast */
+    if( psz_uri[0] == '[') { return( VLC_TRUE ); } 
+
+    if( *psz_end != '.' ) { return( VLC_FALSE ); }
 
     return( i_value < 224 ? VLC_FALSE : VLC_TRUE );
 }