diff options
| author | Thomas Schmucker <ts@its1.de> | 2024-11-04 16:22:09 +0100 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2024-11-04 16:22:09 +0100 |
| commit | 47e04a5292a8868ca9c7063aba0e82a9c0f1f755 (patch) | |
| tree | 8a903764e6dd09dab17a05f95d625846deec0777 | |
| parent | 9e339087e328d445f38173401f77502297a638f4 (diff) | |
| download | use-mosquitto-47e04a5292a8868ca9c7063aba0e82a9c0f1f755.tar.gz use-mosquitto-47e04a5292a8868ca9c7063aba0e82a9c0f1f755.tar.bz2 use-mosquitto-47e04a5292a8868ca9c7063aba0e82a9c0f1f755.zip | |
'mqtt_run' nach 'mqtt_handle_messages' umbenannt
| -rw-r--r-- | include/mqtt.h | 8 | ||||
| -rw-r--r-- | src/mqtt.c | 8 | ||||
| -rw-r--r-- | 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 | |||
| 10 | int port, | 10 | int port, |
| 11 | void *userdata); | 11 | void *userdata); |
| 12 | 12 | ||
| 13 | void mqtt_run(struct mosquitto *client, | 13 | void mqtt_handle_messages(struct mosquitto *client, |
| 14 | const char *topics[], | 14 | const char *topics[], |
| 15 | void callback(struct mosquitto *, void *, const struct mosquitto_message *), | 15 | void callback(struct mosquitto *, void *, const struct mosquitto_message *), |
| 16 | const volatile bool *quit); | 16 | const volatile bool *quit); |
| 17 | 17 | ||
| 18 | void mqtt_shutdown(struct mosquitto *client); | 18 | void mqtt_shutdown(struct mosquitto *client); |
| @@ -40,10 +40,10 @@ mqtt_connect(const char *clientid, // NOLINT | |||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | void | 42 | void |
| 43 | mqtt_run(struct mosquitto *client, | 43 | mqtt_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 | ||
