Commit 4e47084d authored by Martin Hurton's avatar Martin Hurton

Minor cleanups

parent c3e40736
...@@ -340,7 +340,7 @@ void zmq::pipe_t::terminate (bool delay_) ...@@ -340,7 +340,7 @@ void zmq::pipe_t::terminate (bool delay_)
// There are still pending messages available, but the user calls // There are still pending messages available, but the user calls
// 'terminate'. We can act as if all the pending messages were read. // 'terminate'. We can act as if all the pending messages were read.
else else
if (state == waiting_for_delimiter && delay == 0) { if (state == waiting_for_delimiter && !delay) {
outpipe = NULL; outpipe = NULL;
send_pipe_term_ack (peer); send_pipe_term_ack (peer);
state = term_ack_sent; state = term_ack_sent;
......
...@@ -110,7 +110,6 @@ int zmq::plain_mechanism_t::process_handshake_message (msg_t *msg_) ...@@ -110,7 +110,6 @@ int zmq::plain_mechanism_t::process_handshake_message (msg_t *msg_)
return 0; return 0;
} }
bool zmq::plain_mechanism_t::is_handshake_complete () const bool zmq::plain_mechanism_t::is_handshake_complete () const
{ {
return state == ready; return state == ready;
...@@ -163,7 +162,7 @@ int zmq::plain_mechanism_t::process_hello_command (msg_t *msg_) ...@@ -163,7 +162,7 @@ int zmq::plain_mechanism_t::process_hello_command (msg_t *msg_)
errno = EPROTO; errno = EPROTO;
return -1; return -1;
} }
size_t username_length = static_cast <size_t> (*ptr++); const size_t username_length = static_cast <size_t> (*ptr++);
bytes_left -= 1; bytes_left -= 1;
if (bytes_left < username_length) { if (bytes_left < username_length) {
...@@ -178,7 +177,7 @@ int zmq::plain_mechanism_t::process_hello_command (msg_t *msg_) ...@@ -178,7 +177,7 @@ int zmq::plain_mechanism_t::process_hello_command (msg_t *msg_)
errno = EPROTO; errno = EPROTO;
return -1; return -1;
} }
size_t password_length = static_cast <size_t> (*ptr++); const size_t password_length = static_cast <size_t> (*ptr++);
bytes_left -= 1; bytes_left -= 1;
if (bytes_left < password_length) { if (bytes_left < password_length) {
......
...@@ -349,7 +349,7 @@ void zmq::session_base_t::process_term (int linger_) ...@@ -349,7 +349,7 @@ void zmq::session_base_t::process_term (int linger_)
void zmq::session_base_t::proceed_with_term () void zmq::session_base_t::proceed_with_term ()
{ {
// The pending phase have just ended. // The pending phase has just ended.
pending = false; pending = false;
// Continue with standard termination. // Continue with standard termination.
......
...@@ -110,7 +110,7 @@ namespace zmq ...@@ -110,7 +110,7 @@ namespace zmq
zmq::pipe_t *pipe; zmq::pipe_t *pipe;
// This set is added to with pipes we are disconnecting, but haven't yet completed // This set is added to with pipes we are disconnecting, but haven't yet completed
std::set<pipe_t *> terminating_pipes; std::set <pipe_t *> terminating_pipes;
// This flag is true if the remainder of the message being processed // This flag is true if the remainder of the message being processed
// is still in the in pipe. // is still in the in pipe.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment