diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2023-07-15 18:41:58 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2023-07-15 18:41:58 +0200 |
| commit | 644bd0f6124ac1f4058a81c8745569bfcd86dcb8 (patch) | |
| tree | d3e59a61d412e1d89f725ae4c04b6936f043b0f6 | |
| parent | 97c48bd23dacabf9ceb986dcfa6cce1e3caa7586 (diff) | |
Minor changes
| -rw-r--r-- | src/client.c | 2 | ||||
| -rw-r--r-- | src/publisher.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/client.c b/src/client.c index ebc7b2b..f664a95 100644 --- a/src/client.c +++ b/src/client.c @@ -28,7 +28,7 @@ int main (int argc, char *argv []) void *subscriber = zmq_socket (context, ZMQ_SUB); char bindto[30]; sprintf(bindto,"tcp://%s:%d",ip,port); - int rc = zmq_connect (subscriber, bindto); + int rc = zmq_bind (subscriber, bindto); if(rc!=0){ printf("Failed to bind zmq on %s\n",bindto); exit(1); diff --git a/src/publisher.c b/src/publisher.c index c30b52a..0b1ac53 100644 --- a/src/publisher.c +++ b/src/publisher.c @@ -37,7 +37,7 @@ int main (int argc, char *argv []) void *publisher = zmq_socket (context, ZMQ_PUB); char bindto[30]; sprintf(bindto,"tcp://%s:%d",__interface,__port); - int rc = zmq_bind (publisher, bindto); + int rc = zmq_connect (publisher, bindto); if(rc!=0){ printf("Failed to bind zmq on %s\n",bindto); exit(1); @@ -65,7 +65,7 @@ int main (int argc, char *argv []) // Send current one if(FILE_EXISTS(logfile)){ publish(publisher,logfile,client,interval); - remove(logfile); + //remove(logfile); } } } |
