summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mqtt.c8
-rw-r--r--src/subscribe.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/mqtt.c b/src/mqtt.c
index 34e7ee8..5a8bfc0 100644
--- a/src/mqtt.c
+++ b/src/mqtt.c
@@ -40,10 +40,10 @@ mqtt_connect(const char *clientid, // NOLINT
40} 40}
41 41
42void 42void
43mqtt_run(struct mosquitto *client, 43mqtt_handle_messages(struct mosquitto *client,
44 const char *topics[], 44 const char *topics[],
45 void callback(struct mosquitto *, void *, const struct mosquitto_message *), 45 void callback(struct mosquitto *, void *, const struct mosquitto_message *),
46 const volatile bool *quit) 46 const volatile bool *quit)
47{ 47{
48 if ( callback ) { 48 if ( callback ) {
49 mosquitto_message_callback_set(client, callback); 49 mosquitto_message_callback_set(client, callback);
diff --git a/src/subscribe.c b/src/subscribe.c
index b016283..abe862b 100644
--- a/src/subscribe.c
+++ b/src/subscribe.c
@@ -71,10 +71,10 @@ main(void)
71 return EXIT_FAILURE; 71 return EXIT_FAILURE;
72 } 72 }
73 73
74 mqtt_run(client, 74 mqtt_handle_messages(client,
75 (const char *[]){ TOPIC, "testtopic", NULL }, 75 (const char *[]){ TOPIC, "testtopic", NULL },
76 callback, 76 callback,
77 &terminate); 77 &terminate);
78 78
79 mqtt_shutdown(client); 79 mqtt_shutdown(client);
80 80