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

Suppress timeout parameter from net_Select() - refs #1056.

The only use of the timeout was to poll b_die, but net_ReadInner()
takes care of that already.
parent 6b382b4b
......@@ -127,11 +127,11 @@ struct virtual_socket_t
#define net_Read(a,b,c,d,e,f) __net_Read(VLC_OBJECT(a),b,c,d,e,f)
VLC_EXPORT( ssize_t, __net_Read, ( vlc_object_t *p_this, int fd, const v_socket_t *, uint8_t *p_data, size_t i_data, vlc_bool_t b_retry ) );
#define net_ReadNonBlock(a,b,c,d,e,f) __net_ReadNonBlock(VLC_OBJECT(a),b,c,d,e,f)
VLC_EXPORT( ssize_t, __net_ReadNonBlock, ( vlc_object_t *p_this, int fd, const v_socket_t *, uint8_t *p_data, size_t i_data, mtime_t i_wait ) );
#define net_ReadNonBlock(a,b,c,d,e) __net_ReadNonBlock(VLC_OBJECT(a),b,c,d,e)
VLC_EXPORT( ssize_t, __net_ReadNonBlock, ( vlc_object_t *p_this, int fd, const v_socket_t *, uint8_t *p_data, size_t i_data ) );
#define net_Select(a,b,c,d,e,f) __net_Select(VLC_OBJECT(a),b,c,d,e,f)
VLC_EXPORT( ssize_t, __net_Select, ( vlc_object_t *p_this, const int *pi_fd, int i_fd, uint8_t *p_data, size_t i_data, mtime_t i_wait ) );
#define net_Select(a,b,c,d,e) __net_Select(VLC_OBJECT(a),b,c,d,e)
VLC_EXPORT( ssize_t, __net_Select, ( vlc_object_t *p_this, const int *pi_fd, int i_fd, uint8_t *p_data, size_t i_data ) );
#define net_Write(a,b,c,d,e) __net_Write(VLC_OBJECT(a),b,c,d,e)
VLC_EXPORT( ssize_t, __net_Write, ( vlc_object_t *p_this, int fd, const v_socket_t *, const uint8_t *p_data, size_t i_data ) );
......
......@@ -526,7 +526,7 @@ static void Run( services_discovery_t *p_sd )
i_read = net_Select( p_sd, p_sd->p_sys->pi_fd,
p_sd->p_sys->i_fd, p_buffer,
MAX_SAP_BUFFER, 500000 );
MAX_SAP_BUFFER );
/* Check for items that need deletion */
for( i = 0; i < p_sd->p_sys->i_announces; i++ )
......
......@@ -435,19 +435,16 @@ ssize_t __net_ReadNonBlock( vlc_object_t *restrict p_this, int fd,
/*****************************************************************************
* __net_Select:
*****************************************************************************
* Read from several sockets (with timeout). Takes data from the first socket
* that has some.
* NOTE: DO NOT USE this API with a non-zero delay. You were warned.
* Read from several sockets. Takes data from the first socket that has some.
*****************************************************************************/
ssize_t __net_Select( vlc_object_t *restrict p_this,
const int *restrict fds, int nfd,
uint8_t *restrict buf, size_t len, mtime_t i_wait )
uint8_t *restrict buf, size_t len )
{
const v_socket_t *vsv[nfd];
memset( vsv, 0, sizeof (vsv) );
return net_ReadInner( p_this, nfd, fds, vsv, buf, len,
i_wait / 1000, VLC_FALSE );
return net_ReadInner( p_this, nfd, fds, vsv, buf, len, -1, 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