json2tlv instruction and fixes

This commit is contained in:
cardigliano 2019-08-23 19:13:25 +02:00
parent 41f21963ab
commit e82d347e3a
2 changed files with 12 additions and 4 deletions

View file

@ -200,14 +200,15 @@ int main(int argc, char *argv[]) {
if (zmq_endpoint[strlen(zmq_endpoint) - 1] == 'c') {
/* Collector mode */
if (zmq_connect(zmq_sock, zmq_endpoint) != 0)
printf("Unable to connect to ZMQ socket %s: %s\n", zmq_endpoint, strerror(errno));
} else {
/* Probe mode */
if (zmq_bind(zmq_sock, zmq_endpoint) != 0) {
printf("Unable to bind to ZMQ socket %s: %s\n", zmq_endpoint, strerror(errno));
exit(1);
}
} else {
/* Probe mode */
if (zmq_connect(zmq_sock, zmq_endpoint) != 0)
printf("Unable to connect to ZMQ socket %s: %s\n", zmq_endpoint, strerror(errno));
}
}