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
f944336e
Commit
f944336e
authored
Mar 22, 2012
by
Martin Hurton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix race condition in find_endpoint
parent
8a64d80f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ctx.cpp
src/ctx.cpp
+3
-3
No files found.
src/ctx.cpp
View file @
f944336e
...
@@ -337,16 +337,16 @@ zmq::endpoint_t zmq::ctx_t::find_endpoint (const char *addr_)
...
@@ -337,16 +337,16 @@ zmq::endpoint_t zmq::ctx_t::find_endpoint (const char *addr_)
endpoint_t
empty
=
{
NULL
,
options_t
()};
endpoint_t
empty
=
{
NULL
,
options_t
()};
return
empty
;
return
empty
;
}
}
endpoint_t
*
endpoint
=
&
it
->
second
;
endpoint_t
endpoint
=
it
->
second
;
// Increment the command sequence number of the peer so that it won't
// Increment the command sequence number of the peer so that it won't
// get deallocated until "bind" command is issued by the caller.
// get deallocated until "bind" command is issued by the caller.
// The subsequent 'bind' has to be called with inc_seqnum parameter
// The subsequent 'bind' has to be called with inc_seqnum parameter
// set to false, so that the seqnum isn't incremented twice.
// set to false, so that the seqnum isn't incremented twice.
endpoint
->
socket
->
inc_seqnum
();
endpoint
.
socket
->
inc_seqnum
();
endpoints_sync
.
unlock
();
endpoints_sync
.
unlock
();
return
*
endpoint
;
return
endpoint
;
}
}
// The last used socket ID, or 0 if no socket was used so far. Note that this
// The last used socket ID, or 0 if no socket was used so far. Note that this
...
...
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