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
1ffc5d11
Commit
1ffc5d11
authored
Jan 01, 2013
by
Matt Arsenault
Committed by
Matt Arsenault
Jan 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some of the -Wshadows
parent
14d3245e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
options.cpp
src/options.cpp
+3
-3
socket_base.cpp
src/socket_base.cpp
+13
-13
No files found.
src/options.cpp
View file @
1ffc5d11
...
...
@@ -320,13 +320,13 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
else
{
std
::
string
filter_str
((
const
char
*
)
optval_
,
optvallen_
);
tcp_address_mask_t
filter
;
int
rc
=
filter
.
resolve
(
filter_str
.
c_str
(),
ipv4only
?
true
:
false
);
tcp_address_mask_t
mask
;
int
rc
=
mask
.
resolve
(
filter_str
.
c_str
(),
ipv4only
?
true
:
false
);
if
(
rc
!=
0
)
{
errno
=
EINVAL
;
return
-
1
;
}
tcp_accept_filters
.
push_back
(
filter
);
tcp_accept_filters
.
push_back
(
mask
);
return
0
;
}
...
...
src/socket_base.cpp
View file @
1ffc5d11
...
...
@@ -437,14 +437,14 @@ int zmq::socket_base_t::connect (const char *addr_)
// Create a bi-directional pipe to connect the peers.
object_t
*
parents
[
2
]
=
{
this
,
peer
.
socket
};
pipe_t
*
pipes
[
2
]
=
{
NULL
,
NULL
};
pipe_t
*
new_
pipes
[
2
]
=
{
NULL
,
NULL
};
int
hwms
[
2
]
=
{
sndhwm
,
rcvhwm
};
bool
delays
[
2
]
=
{
options
.
delay_on_disconnect
,
options
.
delay_on_close
};
int
rc
=
pipepair
(
parents
,
pipes
,
hwms
,
delays
);
int
rc
=
pipepair
(
parents
,
new_
pipes
,
hwms
,
delays
);
errno_assert
(
rc
==
0
);
// Attach local end of the pipe to this socket object.
attach_pipe
(
pipes
[
0
]);
attach_pipe
(
new_
pipes
[
0
]);
// If required, send the identity of the local socket to the peer.
if
(
peer
.
options
.
recv_identity
)
{
...
...
@@ -453,9 +453,9 @@ int zmq::socket_base_t::connect (const char *addr_)
errno_assert
(
rc
==
0
);
memcpy
(
id
.
data
(),
options
.
identity
,
options
.
identity_size
);
id
.
set_flags
(
msg_t
::
identity
);
bool
written
=
pipes
[
0
]
->
write
(
&
id
);
bool
written
=
new_
pipes
[
0
]
->
write
(
&
id
);
zmq_assert
(
written
);
pipes
[
0
]
->
flush
();
new_
pipes
[
0
]
->
flush
();
}
// If required, send the identity of the peer to the local socket.
...
...
@@ -465,21 +465,21 @@ int zmq::socket_base_t::connect (const char *addr_)
errno_assert
(
rc
==
0
);
memcpy
(
id
.
data
(),
peer
.
options
.
identity
,
peer
.
options
.
identity_size
);
id
.
set_flags
(
msg_t
::
identity
);
bool
written
=
pipes
[
1
]
->
write
(
&
id
);
bool
written
=
new_
pipes
[
1
]
->
write
(
&
id
);
zmq_assert
(
written
);
pipes
[
1
]
->
flush
();
new_
pipes
[
1
]
->
flush
();
}
// Attach remote end of the pipe to the peer socket. Note that peer's
// seqnum was incremented in find_endpoint function. We don't need it
// increased here.
send_bind
(
peer
.
socket
,
pipes
[
1
],
false
);
send_bind
(
peer
.
socket
,
new_
pipes
[
1
],
false
);
// Save last endpoint URI
options
.
last_endpoint
.
assign
(
addr_
);
// remember inproc connections for disconnect
inprocs
.
insert
(
inprocs_t
::
value_type
(
std
::
string
(
addr_
),
pipes
[
0
]));
inprocs
.
insert
(
inprocs_t
::
value_type
(
std
::
string
(
addr_
),
new_
pipes
[
0
]));
return
0
;
}
...
...
@@ -540,17 +540,17 @@ int zmq::socket_base_t::connect (const char *addr_)
if
(
options
.
delay_attach_on_connect
!=
1
||
icanhasall
)
{
// Create a bi-directional pipe.
object_t
*
parents
[
2
]
=
{
this
,
session
};
pipe_t
*
pipes
[
2
]
=
{
NULL
,
NULL
};
pipe_t
*
new_
pipes
[
2
]
=
{
NULL
,
NULL
};
int
hwms
[
2
]
=
{
options
.
sndhwm
,
options
.
rcvhwm
};
bool
delays
[
2
]
=
{
options
.
delay_on_disconnect
,
options
.
delay_on_close
};
rc
=
pipepair
(
parents
,
pipes
,
hwms
,
delays
);
rc
=
pipepair
(
parents
,
new_
pipes
,
hwms
,
delays
);
errno_assert
(
rc
==
0
);
// Attach local end of the pipe to the socket object.
attach_pipe
(
pipes
[
0
],
icanhasall
);
attach_pipe
(
new_
pipes
[
0
],
icanhasall
);
// Attach remote end of the pipe to the session object later on.
session
->
attach_pipe
(
pipes
[
1
]);
session
->
attach_pipe
(
new_
pipes
[
1
]);
}
// Save last endpoint URI
...
...
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