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
d1134955
Commit
d1134955
authored
May 21, 2013
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #560 from hintjens/master
Working on Travis builds
parents
536ea4fc
41126930
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
18 deletions
+33
-18
router.cpp
src/router.cpp
+33
-18
No files found.
src/router.cpp
View file @
d1134955
...
@@ -68,27 +68,42 @@ void zmq::router_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_)
...
@@ -68,27 +68,42 @@ void zmq::router_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_)
int
zmq
::
router_t
::
xsetsockopt
(
int
option_
,
const
void
*
optval_
,
int
zmq
::
router_t
::
xsetsockopt
(
int
option_
,
const
void
*
optval_
,
size_t
optvallen_
)
size_t
optvallen_
)
{
{
if
(
option_
!=
ZMQ_ROUTER_MANDATORY
bool
is_int
=
(
optvallen_
==
sizeof
(
int
));
&&
option_
!=
ZMQ_ROUTER_RAW
)
{
int
value
=
is_int
?
*
((
int
*
)
optval_
)
:
0
;
errno
=
EINVAL
;
return
-
1
;
switch
(
option_
)
{
}
case
ZMQ_ROUTER_RAW
:
if
(
optvallen_
!=
sizeof
(
int
)
||
*
static_cast
<
const
int
*>
(
optval_
)
<
0
)
{
if
(
is_int
&&
value
>=
0
)
{
errno
=
EINVAL
;
raw_sock
=
value
;
return
-
1
;
if
(
raw_sock
)
{
}
options
.
recv_identity
=
false
;
if
(
option_
==
ZMQ_ROUTER_RAW
)
{
options
.
raw_sock
=
true
;
raw_sock
=
(
*
static_cast
<
const
int
*>
(
optval_
)
!=
0
);
}
if
(
raw_sock
)
{
return
0
;
options
.
recv_identity
=
false
;
}
options
.
raw_sock
=
true
;
// DEBUGGING PROBLEM WITH TRAVIS CI
}
printf
(
"E: invalid option value (int=%d value=%d)
\n
"
,
is_int
,
value
);
break
;
case
ZMQ_ROUTER_MANDATORY
:
if
(
is_int
&&
value
>=
0
)
{
mandatory
=
value
;
return
0
;
}
// DEBUGGING PROBLEM WITH TRAVIS CI
printf
(
"E: invalid option value (int=%d value=%d)
\n
"
,
is_int
,
value
);
break
;
default
:
break
;
}
}
else
// DEBUGGING PROBLEM WITH TRAVIS CI
mandatory
=
(
*
static_cast
<
const
int
*>
(
optval_
)
!=
0
);
printf
(
"E: invalid option (option=%d)
\n
"
,
option_
);
return
0
;
errno
=
EINVAL
;
return
-
1
;
}
}
void
zmq
::
router_t
::
xterminated
(
pipe_t
*
pipe_
)
void
zmq
::
router_t
::
xterminated
(
pipe_t
*
pipe_
)
{
{
std
::
set
<
pipe_t
*>::
iterator
it
=
anonymous_pipes
.
find
(
pipe_
);
std
::
set
<
pipe_t
*>::
iterator
it
=
anonymous_pipes
.
find
(
pipe_
);
...
...
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