mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 10:52:56 +01:00
Problem: Misleading error code in case ZAP handler sends an invalid status code (#2646)
Solution: Use EPROTO instead of EACCES error code in that case
This commit is contained in:
parent
5d4e30eb13
commit
c191909c0e
@ -317,7 +317,7 @@ int zmq::curve_server_t::process_hello (msg_t *msg_)
|
||||
hello_nonce, cn_client, secret_key);
|
||||
if (rc != 0) {
|
||||
// CURVE I: cannot open client HELLO -- wrong server key?
|
||||
current_error_detail = encryption;
|
||||
current_error_detail = encryption;
|
||||
errno = EPROTO;
|
||||
return -1;
|
||||
}
|
||||
@ -709,7 +709,7 @@ int zmq::curve_server_t::receive_and_process_zap_reply ()
|
||||
if (msg [3].size () != 3) {
|
||||
// CURVE I: ZAP handler sent invalid status code
|
||||
current_error_detail = zap;
|
||||
errno = EACCES;
|
||||
errno = EPROTO;
|
||||
return close_and_return (msg, -1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user