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
7481fba5
Commit
7481fba5
authored
Aug 20, 2017
by
Constantin Rack
Committed by
GitHub
Aug 20, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2706 from bluca/gssapi_test_monitor
Problem: test_security_gssapi expects wrong event
parents
72b517b3
b239d99a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
test_security_gssapi.cpp
tests/test_security_gssapi.cpp
+9
-3
No files found.
tests/test_security_gssapi.cpp
View file @
7481fba5
...
...
@@ -74,6 +74,7 @@ get_monitor_event (void *monitor, int *value, char **address)
uint16_t
event
=
*
(
uint16_t
*
)
(
data
);
if
(
value
)
*
value
=
*
(
uint32_t
*
)
(
data
+
2
);
zmq_msg_close
(
&
msg
);
// Second frame in message contains event address
zmq_msg_init
(
&
msg
);
...
...
@@ -88,6 +89,8 @@ get_monitor_event (void *monitor, int *value, char **address)
memcpy
(
*
address
,
data
,
size
);
*
address
[
size
]
=
0
;
}
zmq_msg_close
(
&
msg
);
return
event
;
}
#endif
...
...
@@ -216,8 +219,10 @@ void test_null_creds (void *ctx, void *server, void *server_mon, char *endpoint)
close_zero_linger
(
client
);
#ifdef ZMQ_BUILD_DRAFT_API
int
event
=
get_monitor_event
(
server_mon
,
NULL
,
NULL
);
assert
(
event
==
ZMQ_EVENT_HANDSHAKE_FAILED_AUTH
);
int
error
;
int
event
=
get_monitor_event
(
server_mon
,
&
error
,
NULL
);
assert
(
event
==
ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL
);
assert
(
error
==
ZMQ_PROTOCOL_ERROR_ZMTP_MECHANISM_MISMATCH
);
#endif
}
...
...
@@ -318,7 +323,8 @@ int main (void)
#ifdef ZMQ_BUILD_DRAFT_API
// Monitor handshake events on the server
rc
=
zmq_socket_monitor
(
server
,
"inproc://monitor-server"
,
ZMQ_EVENT_HANDSHAKE_SUCCEEDED
|
ZMQ_EVENT_HANDSHAKE_FAILED_AUTH
);
ZMQ_EVENT_HANDSHAKE_SUCCEEDED
|
ZMQ_EVENT_HANDSHAKE_FAILED_AUTH
|
ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL
);
assert
(
rc
==
0
);
#endif
...
...
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