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
e162c8bd
Commit
e162c8bd
authored
Feb 01, 2019
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: code duplication around getsockname
Solution: also use get_socket_address from base class
parent
2b04946f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
ipc_listener.cpp
src/ipc_listener.cpp
+3
-8
No files found.
src/ipc_listener.cpp
View file @
e162c8bd
...
...
@@ -153,15 +153,10 @@ void zmq::ipc_listener_t::in_event ()
int
zmq
::
ipc_listener_t
::
get_address
(
std
::
string
&
addr_
)
{
struct
sockaddr_storage
ss
;
#ifdef ZMQ_HAVE_HPUX
int
sl
=
sizeof
(
ss
);
#else
socklen_t
sl
=
sizeof
(
ss
);
#endif
int
rc
=
getsockname
(
_s
,
reinterpret_cast
<
sockaddr
*>
(
&
ss
),
&
sl
);
if
(
rc
!=
0
)
{
const
zmq_socklen_t
sl
=
get_socket_address
(
&
ss
);
if
(
sl
==
0
)
{
addr_
.
clear
();
return
rc
;
return
-
1
;
}
ipc_address_t
addr
(
reinterpret_cast
<
struct
sockaddr
*>
(
&
ss
),
sl
);
...
...
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