From: Florian Forster Date: Fri, 21 Nov 2014 10:23:01 +0000 (+0100) Subject: mqtt plugin: Correctly check the return value of format_topic(). X-Git-Tag: collectd-5.6.0~637^2~12 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7a66c29615152b9e6353020338b286a780e2ac13;p=collectd.git mqtt plugin: Correctly check the return value of format_topic(). --- diff --git a/src/mqtt.c b/src/mqtt.c index c5254375..163bd4ad 100644 --- a/src/mqtt.c +++ b/src/mqtt.c @@ -191,6 +191,7 @@ static int mqtt_write (const data_set_t *ds, const value_list_t *vl, conf = user_data->data; status = format_topic (topic, sizeof (topic), ds, vl, conf); + if (status != 0) { ERROR ("mqtt plugin: format_topic failed with status %d.", status); return (status);