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
b7386f5b
Commit
b7386f5b
authored
Oct 14, 2010
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
To insert to associateive STL containers value_type used instead of make_pair
Signed-off-by:
Martin Sustrik
<
sustrik@250bpm.com
>
parent
f9e6d94b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
ctx.cpp
src/ctx.cpp
+2
-2
pgm_receiver.cpp
src/pgm_receiver.cpp
+1
-1
socket_base.cpp
src/socket_base.cpp
+1
-1
xrep.cpp
src/xrep.cpp
+1
-1
No files found.
src/ctx.cpp
View file @
b7386f5b
...
@@ -247,8 +247,8 @@ int zmq::ctx_t::register_endpoint (const char *addr_,
...
@@ -247,8 +247,8 @@ int zmq::ctx_t::register_endpoint (const char *addr_,
{
{
endpoints_sync
.
lock
();
endpoints_sync
.
lock
();
bool
inserted
=
endpoints
.
insert
(
std
::
make_pair
(
std
::
string
(
addr_
),
bool
inserted
=
endpoints
.
insert
(
endpoints_t
::
value_type
(
socket_
)).
second
;
s
td
::
string
(
addr_
),
s
ocket_
)).
second
;
if
(
!
inserted
)
{
if
(
!
inserted
)
{
errno
=
EADDRINUSE
;
errno
=
EADDRINUSE
;
endpoints_sync
.
unlock
();
endpoints_sync
.
unlock
();
...
...
src/pgm_receiver.cpp
View file @
b7386f5b
...
@@ -179,7 +179,7 @@ void zmq::pgm_receiver_t::in_event ()
...
@@ -179,7 +179,7 @@ void zmq::pgm_receiver_t::in_event ()
// New peer. Add it to the list of know but unjoint peers.
// New peer. Add it to the list of know but unjoint peers.
if
(
it
==
peers
.
end
())
{
if
(
it
==
peers
.
end
())
{
peer_info_t
peer_info
=
{
false
,
NULL
};
peer_info_t
peer_info
=
{
false
,
NULL
};
it
=
peers
.
insert
(
std
::
make_pair
(
*
tsi
,
peer_info
)).
first
;
it
=
peers
.
insert
(
peers_t
::
value_type
(
*
tsi
,
peer_info
)).
first
;
}
}
// Read the offset of the fist message in the current packet.
// Read the offset of the fist message in the current packet.
...
...
src/socket_base.cpp
View file @
b7386f5b
...
@@ -562,7 +562,7 @@ bool zmq::socket_base_t::register_session (const blob_t &name_,
...
@@ -562,7 +562,7 @@ bool zmq::socket_base_t::register_session (const blob_t &name_,
{
{
sessions_sync
.
lock
();
sessions_sync
.
lock
();
bool
registered
=
sessions
.
insert
(
bool
registered
=
sessions
.
insert
(
s
td
::
make_pair
(
name_
,
session_
)).
second
;
s
essions_t
::
value_type
(
name_
,
session_
)).
second
;
sessions_sync
.
unlock
();
sessions_sync
.
unlock
();
return
registered
;
return
registered
;
}
}
...
...
src/xrep.cpp
View file @
b7386f5b
...
@@ -56,7 +56,7 @@ void zmq::xrep_t::xattach_pipes (reader_t *inpipe_, writer_t *outpipe_,
...
@@ -56,7 +56,7 @@ void zmq::xrep_t::xattach_pipes (reader_t *inpipe_, writer_t *outpipe_,
// TODO: What if new connection has same peer identity as the old one?
// TODO: What if new connection has same peer identity as the old one?
outpipe_t
outpipe
=
{
outpipe_
,
true
};
outpipe_t
outpipe
=
{
outpipe_
,
true
};
bool
ok
=
outpipes
.
insert
(
std
::
make_pair
(
bool
ok
=
outpipes
.
insert
(
outpipes_t
::
value_type
(
peer_identity_
,
outpipe
)).
second
;
peer_identity_
,
outpipe
)).
second
;
zmq_assert
(
ok
);
zmq_assert
(
ok
);
...
...
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