]> git.sesse.net Git - vlc/commitdiff
Remove useless parameter to net_Select
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 11 Feb 2007 21:01:47 +0000 (21:01 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 11 Feb 2007 21:01:47 +0000 (21:01 +0000)
include/vlc_network.h
modules/services_discovery/sap.c
src/network/io.c

index e2495ad5bb20de4f16832976333caf6a6f0e9af3..8bcbac7244ad65818c58dcf21aea5e2bec13f476 100644 (file)
@@ -120,8 +120,8 @@ VLC_EXPORT( int, __net_Read, ( vlc_object_t *p_this, int fd, const v_socket_t *,
 #define net_ReadNonBlock(a,b,c,d,e,f) __net_ReadNonBlock(VLC_OBJECT(a),b,c,d,e,f)
 VLC_EXPORT( int, __net_ReadNonBlock, ( vlc_object_t *p_this, int fd, const v_socket_t *, uint8_t *p_data, int i_data, mtime_t i_wait ) );
 
-#define net_Select(a,b,c,d,e,f,g) __net_Select(VLC_OBJECT(a),b,c,d,e,f,g)
-VLC_EXPORT( int, __net_Select, ( vlc_object_t *p_this, const int *pi_fd, const v_socket_t *const *, int i_fd, uint8_t *p_data, int i_data, mtime_t i_wait ) );
+#define net_Select(a,b,c,d,e,f) __net_Select(VLC_OBJECT(a),b,c,d,e,f)
+VLC_EXPORT( int, __net_Select, ( vlc_object_t *p_this, const int *pi_fd, int i_fd, uint8_t *p_data, int i_data, mtime_t i_wait ) );
 
 #define net_Write(a,b,c,d,e) __net_Write(VLC_OBJECT(a),b,c,d,e)
 VLC_EXPORT( int, __net_Write, ( vlc_object_t *p_this, int fd, const v_socket_t *, const uint8_t *p_data, int i_data ) );
index ba62ae738332c9544f29f742497299e9e21969bc..f1ee9c1be4ff66e3776fd569732a17e1eb3c309e 100644 (file)
@@ -524,7 +524,7 @@ static void Run( services_discovery_t *p_sd )
         int i_read;
         uint8_t p_buffer[MAX_SAP_BUFFER+1];
 
-        i_read = net_Select( p_sd, p_sd->p_sys->pi_fd, NULL,
+        i_read = net_Select( p_sd, p_sd->p_sys->pi_fd,
                              p_sd->p_sys->i_fd, p_buffer,
                              MAX_SAP_BUFFER, 500000 );
 
@@ -658,13 +658,12 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
         int newsize = Decompress (buf, &decomp, end - buf);
         if (newsize < 0)
         {
-            msg_Warn( p_sd, "decompression of sap packet failed" );
+            msg_Dbg( p_sd, "decompression of SAP packet failed" );
             return VLC_EGENERIC;
         }
 
         decomp = realloc (decomp, newsize + 1);
         decomp[newsize] = '\0';
-
         psz_sdp = (const char *)decomp;
         len = newsize;
     }
index 427580f2f1b14e0d154139260cc4acedae337dc4..29bf880aea681f31b2ce81af69088537d3cbfee2 100644 (file)
@@ -464,20 +464,13 @@ int __net_ReadNonBlock( vlc_object_t *restrict p_this, int fd,
  * that has some.
  *****************************************************************************/
 int __net_Select( vlc_object_t *restrict p_this, const int *restrict pi_fd,
-                  const v_socket_t *const *restrict pp_vs,
                   int i_fd, uint8_t *restrict p_data, int i_data,
                   mtime_t i_wait )
 {
-    if( pp_vs == NULL )
-    {
-        const v_socket_t *vsv[i_fd];
-        memset( vsv, 0, sizeof (vsv) );
-
-        return net_ReadInner( p_this, i_fd, pi_fd, vsv, p_data, i_data,
-                              i_wait / 1000, VLC_FALSE );
-    }
+    const v_socket_t *vsv[i_fd];
+    memset( vsv, 0, sizeof (vsv) );
 
-    return net_ReadInner( p_this, i_fd, pi_fd, pp_vs, p_data, i_data,
+    return net_ReadInner( p_this, i_fd, pi_fd, vsv, p_data, i_data,
                           i_wait / 1000, VLC_FALSE );
 }