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
8e6ef461
Commit
8e6ef461
authored
9 years ago
by
reza.ebrahimi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changing some camelCase variable names to snake_case in previous commit
parent
d7b74d1f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
38 deletions
+38
-38
err.cpp
src/err.cpp
+3
-3
ip.cpp
src/ip.cpp
+5
-5
socks_connecter.cpp
src/socks_connecter.cpp
+3
-3
tcp.cpp
src/tcp.cpp
+19
-19
tcp_connecter.cpp
src/tcp_connecter.cpp
+3
-3
tcp_listener.cpp
src/tcp_listener.cpp
+5
-5
No files found.
src/err.cpp
View file @
8e6ef461
...
@@ -89,12 +89,12 @@ void zmq::zmq_abort(const char *errmsg_)
...
@@ -89,12 +89,12 @@ void zmq::zmq_abort(const char *errmsg_)
const
char
*
zmq
::
wsa_error
()
const
char
*
zmq
::
wsa_error
()
{
{
const
int
last
E
rror
=
WSAGetLastError
();
const
int
last
_e
rror
=
WSAGetLastError
();
// TODO: This is not a generic way to handle this...
// TODO: This is not a generic way to handle this...
if
(
last
E
rror
==
WSAEWOULDBLOCK
)
if
(
last
_e
rror
==
WSAEWOULDBLOCK
)
return
NULL
;
return
NULL
;
return
wsa_error_no
(
last
E
rror
);
return
wsa_error_no
(
last
_e
rror
);
}
}
const
char
*
zmq
::
wsa_error_no
(
int
no_
)
const
char
*
zmq
::
wsa_error_no
(
int
no_
)
...
...
This diff is collapsed.
Click to expand it.
src/ip.cpp
View file @
8e6ef461
...
@@ -132,11 +132,11 @@ int zmq::get_peer_ip_address (fd_t sockfd_, std::string &ip_addr_)
...
@@ -132,11 +132,11 @@ int zmq::get_peer_ip_address (fd_t sockfd_, std::string &ip_addr_)
rc
=
getpeername
(
sockfd_
,
(
struct
sockaddr
*
)
&
ss
,
&
addrlen
);
rc
=
getpeername
(
sockfd_
,
(
struct
sockaddr
*
)
&
ss
,
&
addrlen
);
#ifdef ZMQ_HAVE_WINDOWS
#ifdef ZMQ_HAVE_WINDOWS
if
(
rc
==
SOCKET_ERROR
)
{
if
(
rc
==
SOCKET_ERROR
)
{
const
int
last
E
rror
=
WSAGetLastError
();
const
int
last
_e
rror
=
WSAGetLastError
();
wsa_assert
(
last
E
rror
!=
WSANOTINITIALISED
&&
wsa_assert
(
last
_e
rror
!=
WSANOTINITIALISED
&&
last
E
rror
!=
WSAEFAULT
&&
last
_e
rror
!=
WSAEFAULT
&&
last
E
rror
!=
WSAEINPROGRESS
&&
last
_e
rror
!=
WSAEINPROGRESS
&&
last
E
rror
!=
WSAENOTSOCK
);
last
_e
rror
!=
WSAENOTSOCK
);
return
0
;
return
0
;
}
}
#else
#else
...
...
This diff is collapsed.
Click to expand it.
src/socks_connecter.cpp
View file @
8e6ef461
...
@@ -368,11 +368,11 @@ int zmq::socks_connecter_t::connect_to_proxy ()
...
@@ -368,11 +368,11 @@ int zmq::socks_connecter_t::connect_to_proxy ()
// Translate error codes indicating asynchronous connect has been
// Translate error codes indicating asynchronous connect has been
// launched to a uniform EINPROGRESS.
// launched to a uniform EINPROGRESS.
#ifdef ZMQ_HAVE_WINDOWS
#ifdef ZMQ_HAVE_WINDOWS
const
int
last
E
rror
=
WSAGetLastError
();
const
int
last
_e
rror
=
WSAGetLastError
();
if
(
last
Error
==
WSAEINPROGRESS
||
lastE
rror
==
WSAEWOULDBLOCK
)
if
(
last
_error
==
WSAEINPROGRESS
||
last_e
rror
==
WSAEWOULDBLOCK
)
errno
=
EINPROGRESS
;
errno
=
EINPROGRESS
;
else
{
else
{
errno
=
wsa_error_to_errno
(
last
E
rror
);
errno
=
wsa_error_to_errno
(
last
_e
rror
);
close
();
close
();
}
}
#else
#else
...
...
This diff is collapsed.
Click to expand it.
src/tcp.cpp
View file @
8e6ef461
...
@@ -178,24 +178,24 @@ void zmq::tune_tcp_retransmit_timeout (fd_t sockfd_, int timeout_)
...
@@ -178,24 +178,24 @@ void zmq::tune_tcp_retransmit_timeout (fd_t sockfd_, int timeout_)
// If not a single byte can be written to the socket in non-blocking mode
// If not a single byte can be written to the socket in non-blocking mode
// we'll get an error (this may happen during the speculative write).
// we'll get an error (this may happen during the speculative write).
const
int
last
E
rror
=
WSAGetLastError
();
const
int
last
_e
rror
=
WSAGetLastError
();
if
(
nbytes
==
SOCKET_ERROR
&&
last
E
rror
==
WSAEWOULDBLOCK
)
if
(
nbytes
==
SOCKET_ERROR
&&
last
_e
rror
==
WSAEWOULDBLOCK
)
return
0
;
return
0
;
// Signalise peer failure.
// Signalise peer failure.
if
(
nbytes
==
SOCKET_ERROR
&&
(
if
(
nbytes
==
SOCKET_ERROR
&&
(
last
E
rror
==
WSAENETDOWN
||
last
_e
rror
==
WSAENETDOWN
||
last
E
rror
==
WSAENETRESET
||
last
_e
rror
==
WSAENETRESET
||
last
E
rror
==
WSAEHOSTUNREACH
||
last
_e
rror
==
WSAEHOSTUNREACH
||
last
E
rror
==
WSAECONNABORTED
||
last
_e
rror
==
WSAECONNABORTED
||
last
E
rror
==
WSAETIMEDOUT
||
last
_e
rror
==
WSAETIMEDOUT
||
last
E
rror
==
WSAECONNRESET
last
_e
rror
==
WSAECONNRESET
))
))
return
-
1
;
return
-
1
;
// Circumvent a Windows bug; see https://support.microsoft.com/en-us/kb/201213
// Circumvent a Windows bug; see https://support.microsoft.com/en-us/kb/201213
// and https://zeromq.jira.com/browse/LIBZMQ-195
// and https://zeromq.jira.com/browse/LIBZMQ-195
if
(
nbytes
==
SOCKET_ERROR
&&
last
E
rror
==
WSAENOBUFS
)
if
(
nbytes
==
SOCKET_ERROR
&&
last
_e
rror
==
WSAENOBUFS
)
return
0
;
return
0
;
wsa_assert
(
nbytes
!=
SOCKET_ERROR
);
wsa_assert
(
nbytes
!=
SOCKET_ERROR
);
...
@@ -240,19 +240,19 @@ int zmq::tcp_read (fd_t s_, void *data_, size_t size_)
...
@@ -240,19 +240,19 @@ int zmq::tcp_read (fd_t s_, void *data_, size_t size_)
// If not a single byte can be read from the socket in non-blocking mode
// If not a single byte can be read from the socket in non-blocking mode
// we'll get an error (this may happen during the speculative read).
// we'll get an error (this may happen during the speculative read).
if
(
rc
==
SOCKET_ERROR
)
{
if
(
rc
==
SOCKET_ERROR
)
{
const
int
last
E
rror
=
WSAGetLastError
();
const
int
last
_e
rror
=
WSAGetLastError
();
if
(
last
E
rror
==
WSAEWOULDBLOCK
)
{
if
(
last
_e
rror
==
WSAEWOULDBLOCK
)
{
errno
=
EAGAIN
;
errno
=
EAGAIN
;
}
}
else
{
else
{
wsa_assert
(
last
E
rror
==
WSAENETDOWN
||
wsa_assert
(
last
_e
rror
==
WSAENETDOWN
||
last
E
rror
==
WSAENETRESET
||
last
_e
rror
==
WSAENETRESET
||
last
E
rror
==
WSAECONNABORTED
||
last
_e
rror
==
WSAECONNABORTED
||
last
E
rror
==
WSAETIMEDOUT
||
last
_e
rror
==
WSAETIMEDOUT
||
last
E
rror
==
WSAECONNRESET
||
last
_e
rror
==
WSAECONNRESET
||
last
E
rror
==
WSAECONNREFUSED
||
last
_e
rror
==
WSAECONNREFUSED
||
last
E
rror
==
WSAENOTCONN
);
last
_e
rror
==
WSAENOTCONN
);
errno
=
wsa_error_to_errno
(
last
E
rror
);
errno
=
wsa_error_to_errno
(
last
_e
rror
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/tcp_connecter.cpp
View file @
8e6ef461
...
@@ -319,11 +319,11 @@ int zmq::tcp_connecter_t::open ()
...
@@ -319,11 +319,11 @@ int zmq::tcp_connecter_t::open ()
// Translate error codes indicating asynchronous connect has been
// Translate error codes indicating asynchronous connect has been
// launched to a uniform EINPROGRESS.
// launched to a uniform EINPROGRESS.
#ifdef ZMQ_HAVE_WINDOWS
#ifdef ZMQ_HAVE_WINDOWS
const
int
last
E
rror
=
WSAGetLastError
();
const
int
last
_e
rror
=
WSAGetLastError
();
if
(
last
Error
==
WSAEINPROGRESS
||
lastE
rror
==
WSAEWOULDBLOCK
)
if
(
last
_error
==
WSAEINPROGRESS
||
last_e
rror
==
WSAEWOULDBLOCK
)
errno
=
EINPROGRESS
;
errno
=
EINPROGRESS
;
else
else
errno
=
wsa_error_to_errno
(
last
E
rror
);
errno
=
wsa_error_to_errno
(
last
_e
rror
);
#else
#else
if
(
errno
==
EINTR
)
if
(
errno
==
EINTR
)
errno
=
EINPROGRESS
;
errno
=
EINPROGRESS
;
...
...
This diff is collapsed.
Click to expand it.
src/tcp_listener.cpp
View file @
8e6ef461
...
@@ -278,11 +278,11 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
...
@@ -278,11 +278,11 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
#ifdef ZMQ_HAVE_WINDOWS
#ifdef ZMQ_HAVE_WINDOWS
if
(
sock
==
INVALID_SOCKET
)
{
if
(
sock
==
INVALID_SOCKET
)
{
const
int
last
E
rror
=
WSAGetLastError
();
const
int
last
_e
rror
=
WSAGetLastError
();
wsa_assert
(
last
E
rror
==
WSAEWOULDBLOCK
||
wsa_assert
(
last
_e
rror
==
WSAEWOULDBLOCK
||
last
E
rror
==
WSAECONNRESET
||
last
_e
rror
==
WSAECONNRESET
||
last
E
rror
==
WSAEMFILE
||
last
_e
rror
==
WSAEMFILE
||
last
E
rror
==
WSAENOBUFS
);
last
_e
rror
==
WSAENOBUFS
);
return
retired_fd
;
return
retired_fd
;
}
}
#if !defined _WIN32_WCE
#if !defined _WIN32_WCE
...
...
This diff is collapsed.
Click to expand it.
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