Commit c819eedd authored by Luca Boccassi's avatar Luca Boccassi

Problem: missing rc checks in udp_engine

Solution: add them
parent b5db4b44
...@@ -396,8 +396,8 @@ void zmq::udp_engine_t::out_event () ...@@ -396,8 +396,8 @@ void zmq::udp_engine_t::out_event ()
if (rc == 0) { if (rc == 0) {
msg_t body_msg; msg_t body_msg;
rc = _session->pull_msg (&body_msg); rc = _session->pull_msg (&body_msg);
// TODO rc is not checked here. We seem to assume rc == 0. An // If there's a group, there should also be a body
// assertion should be added. errno_assert (rc == 0);
const size_t group_size = group_msg.size (); const size_t group_size = group_msg.size ();
const size_t body_size = body_msg.size (); const size_t body_size = body_msg.size ();
...@@ -412,7 +412,7 @@ void zmq::udp_engine_t::out_event () ...@@ -412,7 +412,7 @@ void zmq::udp_engine_t::out_event ()
rc = group_msg.close (); rc = group_msg.close ();
errno_assert (rc == 0); errno_assert (rc == 0);
body_msg.close (); rc = body_msg.close ();
errno_assert (rc == 0); errno_assert (rc == 0);
return; return;
......
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