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

Check sending error (fixes #134; closes #514)

parent 7e0739c6
...@@ -1378,10 +1378,8 @@ static void ThreadSend( vlc_object_t *p_this ) ...@@ -1378,10 +1378,8 @@ static void ThreadSend( vlc_object_t *p_this )
mwait( i_date ); mwait( i_date );
vlc_mutex_lock( &id->lock_sink ); vlc_mutex_lock( &id->lock_sink );
#if 0
unsigned deadc = 0; /* How many dead sockets? */ unsigned deadc = 0; /* How many dead sockets? */
int deadv[id->sinkc]; /* Dead sockets list */ int deadv[id->sinkc]; /* Dead sockets list */
#endif
for( int i = 0; i < id->sinkc; i++ ) for( int i = 0; i < id->sinkc; i++ )
{ {
...@@ -1396,8 +1394,9 @@ static void ThreadSend( vlc_object_t *p_this ) ...@@ -1396,8 +1394,9 @@ static void ThreadSend( vlc_object_t *p_this )
/* splice failed */ /* splice failed */
splice( fd[2], NULL, fd[4], NULL, len, 0 ); splice( fd[2], NULL, fd[4], NULL, len, 0 );
#endif #endif
if( send( id->sinkv[i].rtp_fd, out->p_buffer, len, 0 ) < 0 ) if( ( send( id->sinkv[i].rtp_fd, out->p_buffer, len, 0 ) < 0 )
/*deadv[deadc++] = id->sinkv[i].rtp_fd*/; && ( errno != EAGAIN ) )
deadv[deadc++] = id->sinkv[i].rtp_fd;
} }
vlc_mutex_unlock( &id->lock_sink ); vlc_mutex_unlock( &id->lock_sink );
...@@ -1406,13 +1405,11 @@ static void ThreadSend( vlc_object_t *p_this ) ...@@ -1406,13 +1405,11 @@ static void ThreadSend( vlc_object_t *p_this )
splice( fd[0], NULL, fd[4], NULL, len, 0 ); splice( fd[0], NULL, fd[4], NULL, len, 0 );
#endif #endif
#if 0
for( unsigned i = 0; i < deadc; i++ ) for( unsigned i = 0; i < deadc; i++ )
{ {
msg_Dbg( id, "removing socket %d", deadv[i] ); msg_Dbg( id, "removing socket %d", deadv[i] );
rtp_del_sink( id, deadv[i] ); rtp_del_sink( id, deadv[i] );
} }
#endif
/* Hopefully we won't overflow the SO_MAXCONN accept queue */ /* Hopefully we won't overflow the SO_MAXCONN accept queue */
while( id->listen_fd != NULL ) while( id->listen_fd != NULL )
......
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