[vlc-commits] UDP: use vlc_strerror_c()
Rémi Denis-Courmont
git at videolan.org
Sun Dec 29 15:16:31 CET 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Dec 29 15:56:05 2013 +0200| [f83fbd593e4e91f146ed5c4aabf6fd156ce996d3] | committer: Rémi Denis-Courmont
UDP: use vlc_strerror_c()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f83fbd593e4e91f146ed5c4aabf6fd156ce996d3
---
modules/access_output/udp.c | 3 ++-
modules/services_discovery/sap.c | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/access_output/udp.c b/modules/access_output/udp.c
index 545fe73..89be3b0 100644
--- a/modules/access_output/udp.c
+++ b/modules/access_output/udp.c
@@ -34,6 +34,7 @@
#include <sys/types.h>
#include <assert.h>
+#include <errno.h>
#include <vlc_sout.h>
#include <vlc_block.h>
@@ -443,7 +444,7 @@ static void* ThreadWrite( void *data )
i_to_send = i_group;
}
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();
if( i_dropped_packets )
diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index 91dc88f..554c08e 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -40,6 +40,7 @@
#include <vlc_network.h>
#include <vlc_charset.h>
+#include <errno.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -557,7 +558,8 @@ static void *Run( void *data )
i_read = net_Read (p_sd, ufd[i].fd, NULL, p_buffer,
MAX_SAP_BUFFER, false);
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)
{
/* Parse the packet */
More information about the vlc-commits
mailing list