Skip to content

Commit

Permalink
fix zmq_send() and zmq_recv() for Ruby 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
bwbuchanan committed Jun 5, 2010
1 parent 89ea2e9 commit 998a64a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions rbzmq.cpp
Expand Up @@ -503,9 +503,8 @@ static VALUE socket_send (VALUE self_, VALUE msg_, VALUE flags_)
rc = send_args.rc;
}
else
#else
rc = zmq_send (DATA_PTR (self_), &msg, flags);
#endif
rc = zmq_send (DATA_PTR (self_), &msg, flags);
if (rc != 0 && zmq_errno () == EAGAIN) {
rc = zmq_msg_close (&msg);
assert (rc == 0);
Expand Down Expand Up @@ -555,9 +554,8 @@ static VALUE socket_recv (VALUE self_, VALUE flags_)
rc = recv_args.rc;
}
else
#else
rc = zmq_recv (DATA_PTR (self_), &msg, flags);
#endif
rc = zmq_recv (DATA_PTR (self_), &msg, flags);
if (rc != 0 && zmq_errno () == EAGAIN) {
rc = zmq_msg_close (&msg);
assert (rc == 0);
Expand Down

0 comments on commit 998a64a

Please sign in to comment.