From: Florian Forster Date: Fri, 3 Jul 2015 08:45:37 +0000 (+0200) Subject: mqtt plugin: Change some default values. X-Git-Tag: collectd-5.6.0~637^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=35a4e57c8e27e3ca1850c1dee291c19f1197e6bb;p=collectd.git mqtt plugin: Change some default values. * qos: 0 for publishers, 2 for subscribers * store_rates: true * clean_session: true --- diff --git a/src/mqtt.c b/src/mqtt.c index acc514c5..b5e40aec 100644 --- a/src/mqtt.c +++ b/src/mqtt.c @@ -497,7 +497,9 @@ static int mqtt_config_publisher (oconfig_item_t *ci) conf->host = strdup (MQTT_DEFAULT_HOST); conf->port = MQTT_DEFAULT_PORT; conf->client_id = NULL; + conf->qos = 0; conf->topic_prefix = strdup (MQTT_DEFAULT_TOPIC_PREFIX); + conf->store_rates = 1; C_COMPLAIN_INIT (&conf->complaint_cantpublish); @@ -583,7 +585,9 @@ static int mqtt_config_subscriber (oconfig_item_t *ci) conf->host = strdup (MQTT_DEFAULT_HOST); conf->port = MQTT_DEFAULT_PORT; conf->client_id = NULL; + conf->qos = 2; conf->topic = strdup (MQTT_DEFAULT_TOPIC); + conf->clean_session = 1; C_COMPLAIN_INIT (&conf->complaint_cantpublish);