Commit bcaae7de authored by Constantin Rack's avatar Constantin Rack

Merge pull request #1268 from somdoron/manual_and_welcome

remove debug printf in test_xpub_welcome_msg
parents 9bd34100 0ac0b047
......@@ -38,27 +38,26 @@ int main (void)
// Create a subscriber
void *sub = zmq_socket (ctx, ZMQ_SUB);
// Subscribe to the welcome message
rc = zmq_setsockopt(sub, ZMQ_SUBSCRIBE, "W", 1);
assert(rc == 0);
// Subscribe to the welcome message
rc = zmq_setsockopt(sub, ZMQ_SUBSCRIBE, "W", 1);
assert(rc == 0);
assert (sub);
rc = zmq_connect (sub, "inproc://soname");
assert (rc == 0);
char buffer[2];
char buffer[2];
// Receive the welcome subscription
rc = zmq_recv(pub, buffer, 2, 0);
assert(rc == 2);
assert(buffer[0] == 1);
assert(buffer[1] == 'W');
// Receive the welcome subscription
rc = zmq_recv(pub, buffer, 2, 0);
assert(rc == 2);
assert(buffer[0] == 1);
assert(buffer[1] == 'W');
// Receive the welcome message
rc = zmq_recv(sub, buffer, 1, 0);
printf("%d\n", rc);
assert(rc == 1);
assert(buffer[0] == 'W');
// Receive the welcome message
rc = zmq_recv(sub, buffer, 1, 0);
assert(rc == 1);
assert(buffer[0] == 'W');
// Clean up.
rc = zmq_close (pub);
......
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