mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-04 09:50:09 +00:00
json2tlv instruction and fixes
This commit is contained in:
parent
41f21963ab
commit
e82d347e3a
2 changed files with 12 additions and 4 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue