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
e38166cc
Commit
e38166cc
authored
Mar 19, 2016
by
Mário Kašuba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use sockaddr_storage instead of sockaddr to support IPv6 addresses
parent
3777309b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
select.cpp
src/select.cpp
+5
-4
No files found.
src/select.cpp
View file @
e38166cc
...
...
@@ -435,14 +435,15 @@ bool zmq::select_t::is_retired_fd (const fd_entry_t &entry)
#if defined ZMQ_HAVE_WINDOWS
u_short
zmq
::
select_t
::
get_fd_family
(
fd_t
fd_
)
{
sockaddr
addr
=
{
0
};
int
addr_size
=
sizeof
addr
;
int
rc
=
getsockname
(
fd_
,
&
addr
,
&
addr_size
);
sockaddr_storage
addr
=
{
0
};
int
addr_size
=
sizeof
addr
;
int
rc
=
getsockname
(
fd_
,
(
sockaddr
*
)
&
addr
,
&
addr_size
);
// AF_INET and AF_INET6 can be mixed in select
// TODO: If proven otherwise, should simply return addr.sa_family
if
(
rc
!=
SOCKET_ERROR
)
return
addr
.
s
a_family
==
AF_INET6
?
AF_INET
:
addr
.
sa
_family
;
return
addr
.
s
s_family
==
AF_INET6
?
AF_INET
:
addr
.
ss
_family
;
else
return
AF_UNSPEC
;
}
...
...
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