From f58f8aac0f9ef23cc6999e52d1e1ba9cdf8adeaa Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Mon, 16 Nov 2015 16:47:12 +0000 Subject: [PATCH] Document updates. --- lib/mosquitto.h | 1 + man/libmosquitto.3.xml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/mosquitto.h b/lib/mosquitto.h index 9176910e..b6d94372 100644 --- a/lib/mosquitto.h +++ b/lib/mosquitto.h @@ -576,6 +576,7 @@ libmosq_EXPORT int mosquitto_disconnect(struct mosquitto *mosq); * Note that although the MQTT protocol doesn't use message ids * for messages with QoS=0, libmosquitto assigns them message ids * so they can be tracked with this parameter. + * topic - null terminated string of the topic to publish to. * payloadlen - the size of the payload (bytes). Valid values are between 0 and * 268,435,455. * payload - pointer to the data to send. If payloadlen > 0 this must be a diff --git a/man/libmosquitto.3.xml b/man/libmosquitto.3.xml index 528b6beb..0ceaf05b 100644 --- a/man/libmosquitto.3.xml +++ b/man/libmosquitto.3.xml @@ -444,8 +444,8 @@ int main(int argc, char *argv[]) return 1; } - while(!mosquitto_loop(mosq, -1, 1)){ - } + mosquitto_loop_forever(mosq, -1, 1); + mosquitto_destroy(mosq); mosquitto_lib_cleanup(); return 0;