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
78c4d336
Commit
78c4d336
authored
Sep 05, 2017
by
Luca Boccassi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: new STATISTICS proxy_steerable not behind DRAFT
Solution: ifdef it until it's declared stable
parent
c5aef5e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
proxy.cpp
src/proxy.cpp
+8
-0
test_proxy.cpp
tests/test_proxy.cpp
+2
-0
No files found.
src/proxy.cpp
View file @
78c4d336
...
...
@@ -386,16 +386,20 @@ int zmq::proxy (
if
(
msg
.
size
()
==
9
&&
memcmp
(
msg
.
data
(),
"TERMINATE"
,
9
)
==
0
)
state
=
terminated
;
else
{
#ifdef ZMQ_BUILD_DRAFT_API
if
(
msg
.
size
()
==
10
&&
memcmp
(
msg
.
data
(),
"STATISTICS"
,
10
)
==
0
)
{
rc
=
reply_stats
(
control_
,
&
frontend_stats
,
&
backend_stats
);
CHECK_RC_EXIT_ON_FAILURE
();
}
else
{
#endif
// This is an API error, we assert
puts
(
"E: invalid command sent to proxy"
);
zmq_assert
(
false
);
#ifdef ZMQ_BUILD_DRAFT_API
}
#endif
}
}
control_in
=
false
;
...
...
@@ -566,6 +570,7 @@ int zmq::proxy (
if
(
msg
.
size
()
==
9
&&
memcmp
(
msg
.
data
(),
"TERMINATE"
,
9
)
==
0
)
state
=
terminated
;
else
{
#ifdef ZMQ_BUILD_DRAFT_API
if
(
msg
.
size
()
==
10
&&
memcmp
(
msg
.
data
(),
"STATISTICS"
,
10
)
==
0
)
{
rc
=
reply_stats
(
control_
,
&
frontend_stats
,
&
backend_stats
);
...
...
@@ -573,10 +578,13 @@ int zmq::proxy (
return
close_and_return
(
&
msg
,
-
1
);
}
else
{
#endif
// This is an API error, we assert
puts
(
"E: invalid command sent to proxy"
);
zmq_assert
(
false
);
#ifdef ZMQ_BUILD_DRAFT_API
}
#endif
}
}
// Process a request
...
...
tests/test_proxy.cpp
View file @
78c4d336
...
...
@@ -451,9 +451,11 @@ int main (void)
msleep
(
500
);
// Wait for all clients and workers to STOP
#ifdef ZMQ_BUILD_DRAFT_API
if
(
is_verbose
)
printf
(
"retrieving stats from the proxy
\n
"
);
check_proxy_stats
(
control_proxy
);
#endif
if
(
is_verbose
)
printf
(
"shutting down all clients and server workers
\n
"
);
...
...
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