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);