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
aa27034d
Commit
aa27034d
authored
Jan 24, 2010
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IPv6 patch - part V. (win32)
parent
adc5d769
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
18 deletions
+3
-18
ip.cpp
src/ip.cpp
+3
-18
No files found.
src/ip.cpp
View file @
aa27034d
...
...
@@ -229,17 +229,6 @@ int zmq::resolve_ip_interface (sockaddr_storage* addr_, socklen_t *addr_len_,
// There's no such interface name. Assume literal address.
addrinfo
*
res
=
NULL
;
#if defined ZMQ_HAVE_WINDOWS
// Old versions of Windows don't support inet_pton
// so let's rather use inet_addr instead.
// TODO: This code obviously doesn't work for IPv6 addresses...
ip4_addr
.
sin_addr
.
S_un
.
S_addr
=
inet_addr
(
iface
.
c_str
());
if
(
ip4_addr
.
sin_addr
.
S_un
.
S_addr
==
INADDR_NONE
)
{
errno
=
ENODEV
;
return
-
1
;
}
#else
// Set up the query.
addrinfo
req
;
memset
(
&
req
,
0
,
sizeof
(
req
));
...
...
@@ -263,13 +252,9 @@ int zmq::resolve_ip_interface (sockaddr_storage* addr_, socklen_t *addr_len_,
}
// Use the first result.
out_addr
=
res
->
ai_addr
;
out_addrlen
=
res
->
ai_addrlen
;
#endif
zmq_assert
(
out_addrlen
<=
sizeof
(
*
addr_
));
memcpy
(
addr_
,
out_addr
,
out_addrlen
);
*
addr_len_
=
out_addrlen
;
zmq_assert
(
res
->
ai_addrlen
<=
sizeof
(
*
addr_
));
memcpy
(
addr_
,
res
->
ai_addr
,
res
->
ai_addrlen
);
*
addr_len_
=
res
->
ai_addrlen
;
// Cleanup getaddrinfo after copying the possibly referenced result.
if
(
res
)
...
...
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