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

UDP: use vlc_strerror_c()

parent 4ec3d936
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <assert.h> #include <assert.h>
#include <errno.h>
#include <vlc_sout.h> #include <vlc_sout.h>
#include <vlc_block.h> #include <vlc_block.h>
...@@ -443,7 +444,7 @@ static void* ThreadWrite( void *data ) ...@@ -443,7 +444,7 @@ static void* ThreadWrite( void *data )
i_to_send = i_group; i_to_send = i_group;
} }
if ( send( p_sys->i_handle, p_pk->p_buffer, p_pk->i_buffer, 0 ) == -1 ) if ( send( p_sys->i_handle, p_pk->p_buffer, p_pk->i_buffer, 0 ) == -1 )
msg_Warn( p_access, "send error: %m" ); msg_Warn( p_access, "send error: %s", vlc_strerror_c(errno) );
vlc_cleanup_pop(); vlc_cleanup_pop();
if( i_dropped_packets ) if( i_dropped_packets )
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <vlc_network.h> #include <vlc_network.h>
#include <vlc_charset.h> #include <vlc_charset.h>
#include <errno.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#endif #endif
...@@ -557,7 +558,8 @@ static void *Run( void *data ) ...@@ -557,7 +558,8 @@ static void *Run( void *data )
i_read = net_Read (p_sd, ufd[i].fd, NULL, p_buffer, i_read = net_Read (p_sd, ufd[i].fd, NULL, p_buffer,
MAX_SAP_BUFFER, false); MAX_SAP_BUFFER, false);
if (i_read < 0) if (i_read < 0)
msg_Warn (p_sd, "receive error: %m"); msg_Warn (p_sd, "receive error: %s",
vlc_strerror_c(errno));
if (i_read > 6) if (i_read > 6)
{ {
/* Parse the packet */ /* Parse the packet */
......
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