summaryrefslogtreecommitdiff
path: root/src/client.c
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-07-15 19:12:13 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2023-07-15 19:12:13 +0200
commitb63811848fd58d0c0478244ca19a938ad88a4257 (patch)
treeef6565331d3951710ee68e054bdf035dbe3f6852 /src/client.c
parent644bd0f6124ac1f4058a81c8745569bfcd86dcb8 (diff)
Minor changes
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/client.c b/src/client.c
index f664a95..32172fd 100644
--- a/src/client.c
+++ b/src/client.c
@@ -10,15 +10,14 @@
int main (int argc, char *argv [])
{
- if(argc != 4){
- printf("Usage: %s <address> <port> <cdatadir>",argv[0]);
+ if(argc != 3){
+ printf("Usage: %s <port> <cdatadir>",argv[0]);
exit(1);
}
//----- Arguments
- char *ip=argv[1];
- int port=atoi(argv[2]);
- char *cdatadir=argv[3];
+ int port=atoi(argv[1]);
+ char *cdatadir=argv[2];
//----- Various inits
mkdirp(cdatadir);
@@ -27,7 +26,7 @@ int main (int argc, char *argv [])
void *context = zmq_ctx_new ();
void *subscriber = zmq_socket (context, ZMQ_SUB);
char bindto[30];
- sprintf(bindto,"tcp://%s:%d",ip,port);
+ sprintf(bindto,"tcp://*:%d",port);
int rc = zmq_bind (subscriber, bindto);
if(rc!=0){
printf("Failed to bind zmq on %s\n",bindto);