From 9e339087e328d445f38173401f77502297a638f4 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Mon, 4 Nov 2024 16:18:20 +0100 Subject: Verschiebe callback-handling nach 'mqtt_run' --- src/subscribe.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/subscribe.c') diff --git a/src/subscribe.c b/src/subscribe.c index e7d5883..b016283 100644 --- a/src/subscribe.c +++ b/src/subscribe.c @@ -65,14 +65,16 @@ main(void) PASSWORD, HOSTNAME, PORT, - callback, NULL); if ( !client ) { return EXIT_FAILURE; } - mqtt_run(client, (const char *[]){ TOPIC, "testtopic", NULL }, &terminate); + mqtt_run(client, + (const char *[]){ TOPIC, "testtopic", NULL }, + callback, + &terminate); mqtt_shutdown(client); -- cgit v1.3