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
f5015f4c
Commit
f5015f4c
authored
Mar 16, 2011
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Incorrect errno reported from tcp_listener_t::set_address
Signed-off-by:
Martin Sustrik
<
sustrik@250bpm.com
>
parent
32ded2b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
tcp_listener.cpp
src/tcp_listener.cpp
+16
-4
No files found.
src/tcp_listener.cpp
View file @
f5015f4c
...
...
@@ -201,14 +201,20 @@ int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_,
// Bind the socket to the network interface and port.
rc
=
bind
(
s
,
(
struct
sockaddr
*
)
&
addr
,
addr_len
);
if
(
rc
!=
0
)
{
close
();
int
err
=
errno
;
if
(
close
()
!=
0
)
return
-
1
;
errno
=
err
;
return
-
1
;
}
// Listen for incomming connections.
rc
=
listen
(
s
,
backlog_
);
if
(
rc
!=
0
)
{
close
();
int
err
=
errno
;
if
(
close
()
!=
0
)
return
-
1
;
errno
=
err
;
return
-
1
;
}
...
...
@@ -241,7 +247,10 @@ int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_,
// Bind the socket to the file path.
rc
=
bind
(
s
,
(
struct
sockaddr
*
)
&
addr
,
addr_len
);
if
(
rc
!=
0
)
{
close
();
int
err
=
errno
;
if
(
close
()
!=
0
)
return
-
1
;
errno
=
err
;
return
-
1
;
}
has_file
=
true
;
...
...
@@ -249,7 +258,10 @@ int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_,
// Listen for incomming connections.
rc
=
listen
(
s
,
backlog_
);
if
(
rc
!=
0
)
{
close
();
int
err
=
errno
;
if
(
close
()
!=
0
)
return
-
1
;
errno
=
err
;
return
-
1
;
}
...
...
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