mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-03 01:31:53 +02:00
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.
This commit is contained in:
parent
6b382b4b22
commit
569c1ac494
@ -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 );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user