summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5473c87)
raw | patch | inline | side by side (parent: 5473c87)
author | Florian Forster <octo@collectd.org> | |
Fri, 21 Nov 2014 09:38:55 +0000 (10:38 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Mon, 6 Jul 2015 12:07:10 +0000 (14:07 +0200) |
Instead, use the standard _Bool type.
src/mqtt.c | patch | blob | history |
diff --git a/src/mqtt.c b/src/mqtt.c
index d1d22054880648c6d3ce2f5872c254c803acbc8f..b7f5de84e8a9a46c6459ca9b7c1c9df9d6fcfbf3 100644 (file)
--- a/src/mqtt.c
+++ b/src/mqtt.c
struct mqtt_client_conf
{
struct mosquitto *mosq;
- bool connected;
+ _Bool connected;
char *host;
int port;
char *client_id;
return (-1);
}
- conf->connected = true;
+ conf->connected = 1;
c_release (LOG_INFO,
&conf->complaint_cantpublish,
/* Mark our connection "down" regardless of the error as a safety
* measure; we will try to reconnect the next time we have to publish a
* message */
- conf->connected = false;
+ conf->connected = 0;
pthread_mutex_unlock (&conf->lock);
return (-1);
return (-1);
}
- conf->connected = false;
+ conf->connected = 0;
conf->host = strdup (MQTT_DEFAULT_HOST);
conf->port = MQTT_DEFAULT_PORT;
conf->client_id = strdup (MQTT_DEFAULT_CLIENT_ID);
DEBUG ("mqtt plugin: successfully connected to broker \"%s:%d\"",
conf->host, conf->port);
- conf->connected = true;
+ conf->connected = 1;
plugin_register_write ("mqtt", mqtt_write, &user_data);