]> git.sesse.net Git - vlc/commitdiff
Complete(?) migration to net_strerror/net_errno
authorRémi Denis-Courmont <rem@videolan.org>
Fri, 8 Sep 2006 19:00:04 +0000 (19:00 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Fri, 8 Sep 2006 19:00:04 +0000 (19:00 +0000)
for nicer Win32 error messages

src/network/httpd.c
src/network/io.c

index 8b7c883836f87e9d7ed381dc21856d822bf5ee11..bd01fa1c635525910979a96f75a7a0ac8917a482 100644 (file)
@@ -2416,11 +2416,7 @@ static void httpd_HostThread( httpd_host_t *host )
 
         if( (i_ret == -1) && (errno != EINTR) )
         {
-#if defined(WIN32) || defined(UNDER_CE)
-            msg_Warn( host, "cannot select sockets (%d)", WSAGetLastError( ) );
-#else
-            msg_Warn( host, "cannot select sockets : %s", strerror( errno ) );
-#endif
+            msg_Warn( host, "select error: %s", net_strerror( net_errno ) );
             msleep( 1000 );
             continue;
         }
index 2e4a2addcacdcb9b4c8f91850faf7431aeedf531..48cc78fba938c260b3ba9f25b46750e79ea986d2 100644 (file)
@@ -365,11 +365,7 @@ int __net_Write( vlc_object_t *p_this, int fd, const v_socket_t *p_vs,
 
         if( i_ret < 0 )
         {
-#if defined(WIN32) || defined(UNDER_CE)
-            msg_Err( p_this, "network selection error (%d)", WSAGetLastError() );
-#else
-            msg_Err( p_this, "network selection error (%s)", strerror(errno) );
-#endif
+            msg_Err( p_this, "network error: %s", net_strerror(net_errno) );
             return i_total > 0 ? i_total : -1;
         }