diff options
| author | Thomas Schmucker <ts@its1.de> | 2024-11-04 16:18:20 +0100 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2024-11-04 16:18:20 +0100 |
| commit | 9e339087e328d445f38173401f77502297a638f4 (patch) | |
| tree | 776bda843c2204df08b0fb99580418af13d42f0f /src/subscribe.c | |
| parent | 6d804810804e09c30b348ce7287ac175e41d7881 (diff) | |
| download | use-mosquitto-9e339087e328d445f38173401f77502297a638f4.tar.gz use-mosquitto-9e339087e328d445f38173401f77502297a638f4.tar.bz2 use-mosquitto-9e339087e328d445f38173401f77502297a638f4.zip | |
Verschiebe callback-handling nach 'mqtt_run'
Diffstat (limited to 'src/subscribe.c')
| -rw-r--r-- | src/subscribe.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) | |||
| 65 | PASSWORD, | 65 | PASSWORD, |
| 66 | HOSTNAME, | 66 | HOSTNAME, |
| 67 | PORT, | 67 | PORT, |
| 68 | callback, | ||
| 69 | NULL); | 68 | NULL); |
| 70 | 69 | ||
| 71 | if ( !client ) { | 70 | if ( !client ) { |
| 72 | return EXIT_FAILURE; | 71 | return EXIT_FAILURE; |
| 73 | } | 72 | } |
| 74 | 73 | ||
| 75 | mqtt_run(client, (const char *[]){ TOPIC, "testtopic", NULL }, &terminate); | 74 | mqtt_run(client, |
| 75 | (const char *[]){ TOPIC, "testtopic", NULL }, | ||
| 76 | callback, | ||
| 77 | &terminate); | ||
| 76 | 78 | ||
| 77 | mqtt_shutdown(client); | 79 | mqtt_shutdown(client); |
| 78 | 80 | ||
