Commit bd205274 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove useless parameter to net_Select

parent 40f97350
......@@ -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 ) );
......
......@@ -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;
}
......
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment