* Data types
*/
struct mqtt_client_conf {
- _Bool publish;
+ bool publish;
char *name;
struct mosquitto *mosq;
- _Bool connected;
+ bool connected;
char *host;
int port;
/* For publishing */
char *topic_prefix;
- _Bool store_rates;
- _Bool retain;
+ bool store_rates;
+ bool retain;
/* For subscribing */
pthread_t thread;
- _Bool loop;
+ bool loop;
char *topic;
- _Bool clean_session;
+ bool clean_session;
c_complain_t complaint_cantpublish;
pthread_mutex_t lock;
}
snprintf(cb_name, sizeof(cb_name), "mqtt/%s", conf->name);
- plugin_register_write(cb_name, mqtt_write, &(user_data_t){
- .data = conf,
- });
+ plugin_register_write(cb_name, mqtt_write,
+ &(user_data_t){
+ .data = conf,
+ });
return 0;
} /* mqtt_config_publisher */