Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
426ea716
Commit
426ea716
authored
Jun 13, 2012
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #378 from steve-o/err-handler
Fix #LIBZMQ-329 assertion on WSAEACCES
parents
f35bed0e
acbb9938
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
10 deletions
+51
-10
err.cpp
src/err.cpp
+51
-10
No files found.
src/err.cpp
View file @
426ea716
...
...
@@ -217,28 +217,69 @@ void zmq::win_error (char *buffer_, size_t buffer_size_)
int
zmq
::
wsa_error_to_errno
(
int
errcode
)
{
switch
(
errcode
)
{
case
WSAEINPROGRESS
:
return
EAGAIN
;
// 10009 - File handle is not valid.
case
WSAEBADF
:
return
EBADF
;
// 10013 - Permission denied.
case
WSAEACCES
:
return
EACCES
;
// 10014 - Bad address.
case
WSAEFAULT
:
return
EFAULT
;
// 10022 - Invalid argument.
case
WSAEINVAL
:
return
EINVAL
;
// 10024 - Too many open files.
case
WSAEMFILE
:
return
EMFILE
;
case
WSAEFAULT
:
return
EFAULT
;
// 10036 - Operation now in progress.
case
WSAEINPROGRESS
:
return
EAGAIN
;
// 10040 - Message too long.
case
WSAEMSGSIZE
:
return
EMSGSIZE
;
// 10043 - Protocol not supported.
case
WSAEPROTONOSUPPORT
:
return
EPROTONOSUPPORT
;
case
WSAENOBUFS
:
return
ENOBUFS
;
case
WSAENETDOWN
:
return
ENETDOWN
;
// 10047 - Address family not supported by protocol family.
case
WSAEAFNOSUPPORT
:
return
EAFNOSUPPORT
;
// 10048 - Address already in use.
case
WSAEADDRINUSE
:
return
EADDRINUSE
;
// 10049 - Cannot assign requested address.
case
WSAEADDRNOTAVAIL
:
return
EADDRNOTAVAIL
;
case
WSAEAFNOSUPPORT
:
return
EAFNOSUPPORT
;
// 10050 - Network is down.
case
WSAENETDOWN
:
return
ENETDOWN
;
// 10051 - Network is unreachable.
case
WSAENETUNREACH
:
return
ENETUNREACH
;
// 10052 - Network dropped connection on reset.
case
WSAENETRESET
:
return
ENETRESET
;
// 10053 - Software caused connection abort.
case
WSAECONNABORTED
:
return
ECONNABORTED
;
// 10054 - Connection reset by peer.
case
WSAECONNRESET
:
return
ECONNRESET
;
// 10055 - No buffer space available.
case
WSAENOBUFS
:
return
ENOBUFS
;
// 10057 - Socket is not connected.
case
WSAENOTCONN
:
return
ENOTCONN
;
// 10060 - Connection timed out.
case
WSAETIMEDOUT
:
return
ETIMEDOUT
;
// 10061 - Connection refused.
case
WSAECONNREFUSED
:
return
ECONNREFUSED
;
// 10065 - No route to host.
case
WSAEHOSTUNREACH
:
return
EHOSTUNREACH
;
default
:
wsa_assert
(
false
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment