[vlc-commits] [Git][videolan/vlc][master] 2 commits: win32: add more winsock errors

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Sep 7 10:56:41 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
675ff909 by Steve Lhomme at 2022-09-07T09:48:17+00:00
win32: add more winsock errors

- - - - -
a81ac86b by Steve Lhomme at 2022-09-07T09:48:17+00:00
network: don't use net_errno to log poll() errors

poll(), vlc_poll() and vlc_poll_i11e() set errno, not net_errno

- - - - -


2 changed files:

- src/network/io.c
- src/win32/error.c


Changes:

=====================================
src/network/io.c
=====================================
@@ -180,8 +180,7 @@ int (net_Connect)(vlc_object_t *obj, const char *host, int serv,
             switch (val)
             {
                  case -1: /* error */
-                     msg_Err(obj, "polling error: %s",
-                             vlc_strerror_c(net_errno));
+                     msg_Err(obj, "polling error: %s", vlc_strerror_c(errno));
                      goto next_ai;
 
                  case 0: /* timeout */
@@ -327,7 +326,7 @@ int net_Accept(vlc_object_t *obj, int *fds)
         {
             if (errno != EINTR)
             {
-                msg_Err(obj, "poll error: %s", vlc_strerror_c(net_errno));
+                msg_Err(obj, "poll error: %s", vlc_strerror_c(errno));
                 return -1;
             }
         }


=====================================
src/win32/error.c
=====================================
@@ -25,6 +25,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <winerror.h>
+#include <winsock2.h>
 
 #include <vlc_common.h>
 
@@ -83,6 +84,7 @@ static const wsaerrmsg_t wsaerrmsg[] =
     { WSAEDQUOT, "Disk quota exceeded" },
     { WSAESTALE, "Stale file handle reference" },
     { WSAEREMOTE, "Item is remote", },
+    { WSA_INVALID_PARAMETER, "Invalid parameter", },
     { WSASYSNOTREADY, "Network subsystem is unavailable (network stack not ready)" },
     { WSAVERNOTSUPPORTED, "Winsock.dll version out of range (network stack version not supported" },
     { WSANOTINITIALISED, "Network not initialized" },



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4ced8ba1c50e79062c8b09b7cfa04b7ea205e8fe...a81ac86bd49a4373195fb951723ebe58773c20d8

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4ced8ba1c50e79062c8b09b7cfa04b7ea205e8fe...a81ac86bd49a4373195fb951723ebe58773c20d8
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list