summaryrefslogtreecommitdiff
path: root/src/client/main.c
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-07-14 20:08:36 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2023-07-14 20:08:36 +0200
commit5f4d586aca4b5e802e2d18d527ee0b0a4e2f884c (patch)
treee39c303230a5a09d48377f7074f0857bc85cf837 /src/client/main.c
parente0440fc811bafd9c72b5c85b4d3d59dd8c629027 (diff)
Minor changes
Diffstat (limited to 'src/client/main.c')
-rw-r--r--src/client/main.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/client/main.c b/src/client/main.c
index e7ff4a5..e4b3498 100644
--- a/src/client/main.c
+++ b/src/client/main.c
@@ -6,12 +6,8 @@
#include <time.h>
#include <string.h>
-#define STR(symbol) #symbol
-#define STRINGIFY(symbol) STR(symbol)
+#include "../utils.h"
-#ifndef PUBLISHER_PORT
-#error PUBLISHER_PORT macro undefined
-#endif
int main (int argc, char *argv [])
{
@@ -19,7 +15,7 @@ int main (int argc, char *argv [])
printf ("Collecting updates from weather server...\n");
void *context = zmq_ctx_new ();
void *subscriber = zmq_socket (context, ZMQ_SUB);
- int rc = zmq_connect (subscriber, "tcp://localhost:"STRINGIFY(PUBLISHER_PORT));
+ int rc = zmq_connect (subscriber, "tcp://"STRINGIFY(PUBLISHER_ADDR)":"STRINGIFY(PUBLISHER_PORT));
assert (rc == 0);
// Subscribe to zipcode, default is NYC, 10001