From 47e04a5292a8868ca9c7063aba0e82a9c0f1f755 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Mon, 4 Nov 2024 16:22:09 +0100 Subject: 'mqtt_run' nach 'mqtt_handle_messages' umbenannt --- include/mqtt.h | 8 ++++---- src/mqtt.c | 8 ++++---- src/subscribe.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/mqtt.h b/include/mqtt.h index c0c612d..fecb884 100644 --- a/include/mqtt.h +++ b/include/mqtt.h @@ -10,9 +10,9 @@ struct mosquitto *mqtt_connect(const char *clientid, // NOLINT int port, void *userdata); -void mqtt_run(struct mosquitto *client, - const char *topics[], - void callback(struct mosquitto *, void *, const struct mosquitto_message *), - const volatile bool *quit); +void mqtt_handle_messages(struct mosquitto *client, + const char *topics[], + void callback(struct mosquitto *, void *, const struct mosquitto_message *), + const volatile bool *quit); void mqtt_shutdown(struct mosquitto *client); 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 } void -mqtt_run(struct mosquitto *client, - const char *topics[], - void callback(struct mosquitto *, void *, const struct mosquitto_message *), - const volatile bool *quit) +mqtt_handle_messages(struct mosquitto *client, + const char *topics[], + void callback(struct mosquitto *, void *, const struct mosquitto_message *), + const volatile bool *quit) { if ( callback ) { 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) return EXIT_FAILURE; } - mqtt_run(client, - (const char *[]){ TOPIC, "testtopic", NULL }, - callback, - &terminate); + mqtt_handle_messages(client, + (const char *[]){ TOPIC, "testtopic", NULL }, + callback, + &terminate); mqtt_shutdown(client); -- cgit v1.3