Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Switched out deprecated zmq_sendmsg/recvmsg functions #110

Closed
wants to merge 1 commit into from

2 participants

@hintjens
Owner

No description provided.

@pijyoi
Collaborator

I thought czmq was supposed to maintain compile compatibility with libzmq 2 api?

@hintjens
Owner

Good point...! I'd totally forgotten about that.

@hintjens hintjens closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 5, 2013
  1. @hintjens
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 7 deletions.
  1. +4 −4 src/zframe.c
  2. +3 −3 src/zstr.c
View
8 src/zframe.c
@@ -134,7 +134,7 @@ zframe_recv (void *zocket)
assert (zocket);
zframe_t *self = zframe_new (NULL, 0);
if (self) {
- if (zmq_recvmsg (zocket, &self->zmsg, 0) < 0) {
+ if (zmq_msg_recv (&self->zmsg, zocket, 0) < 0) {
zframe_destroy (&self);
return NULL; // Interrupted or terminated
}
@@ -154,7 +154,7 @@ zframe_recv_nowait (void *zocket)
assert (zocket);
zframe_t *self = zframe_new (NULL, 0);
if (self) {
- if (zmq_recvmsg (zocket, &self->zmsg, ZMQ_DONTWAIT) < 0) {
+ if (zmq_msg_recv (&self->zmsg, zocket, ZMQ_DONTWAIT) < 0) {
zframe_destroy (&self);
return NULL; // Interrupted or terminated
}
@@ -183,12 +183,12 @@ zframe_send (zframe_t **self_p, void *zocket, int flags)
zmq_msg_init (&copy);
if (zmq_msg_copy (&copy, &self->zmsg))
return -1;
- if (zmq_sendmsg (zocket, &copy, snd_flags) == -1)
+ if (zmq_msg_send (&copy, zocket, snd_flags) == -1)
return -1;
zmq_msg_close (&copy);
}
else {
- if (zmq_sendmsg (zocket, &self->zmsg, snd_flags) == -1)
+ if (zmq_msg_send (&self->zmsg, zocket, snd_flags) == -1)
return -1;
zframe_destroy (self_p);
}
View
6 src/zstr.c
@@ -54,7 +54,7 @@ s_send_string (void *zocket, bool more, const char *format, va_list argptr)
zmq_msg_t message;
zmq_msg_init_size (&message, strlen (string));
memcpy (zmq_msg_data (&message), string, strlen (string));
- int rc = zmq_sendmsg (zocket, &message, more? ZMQ_SNDMORE: 0);
+ int rc = zmq_msg_send (&message, zocket, more? ZMQ_SNDMORE: 0);
zmq_msg_close (&message);
free (string);
@@ -72,7 +72,7 @@ zstr_recv (void *zocket)
assert (zocket);
zmq_msg_t message;
zmq_msg_init (&message);
- if (zmq_recvmsg (zocket, &message, 0) < 0)
+ if (zmq_msg_recv (&message, zocket, 0) < 0)
return NULL;
size_t size = zmq_msg_size (&message);
@@ -96,7 +96,7 @@ zstr_recv_nowait (void *zocket)
assert (zocket);
zmq_msg_t message;
zmq_msg_init (&message);
- if (zmq_recvmsg (zocket, &message, ZMQ_DONTWAIT) < 0)
+ if (zmq_msg_recv (&message, zocket, ZMQ_DONTWAIT) < 0)
return NULL;
size_t size = zmq_msg_size (&message);
Something went wrong with that request. Please try again.