mqtt plugin: Rename "CACertificateFile" to "CACert".
authorFlorian Forster <octo@collectd.org>
Fri, 27 Nov 2015 09:03:54 +0000 (10:03 +0100)
committerFlorian Forster <octo@collectd.org>
Fri, 27 Nov 2015 09:03:54 +0000 (10:03 +0100)
This way the option name is consistent with the name used by the cURL
plugins.

Sorry for previous comments in #1345 that pushed towards copying Apache
HTTPd's naming schema -- being consistent within collectd is more
important.

src/collectd.conf.pod
src/mqtt.c

index ee05c3a..baae027 100644 (file)
@@ -3347,7 +3347,7 @@ Configures the topic(s) to subscribe to. You can use the single level C<+> and
 multi level C<#> wildcards. Defaults to B<collectd/#>, i.e. all topics beneath
 the B<collectd> branch.
 
-=item B<CACertificateFile> I<file>
+=item B<CACert> I<file>
 
 Path to the PEM-encoded CA certificate file. Setting this option enables TLS
 communication with the MQTT broker, and as such, B<Port> should be the TLS-enabled
index 403b0d3..f8c1e0e 100644 (file)
@@ -532,7 +532,7 @@ static int mqtt_write (const data_set_t *ds, const value_list_t *vl,
  *   StoreRates true
  *   Retain false
  *   QoS 0
- *   CACertificateFile "ca.pem"                        Enables TLS if set
+ *   CACert "ca.pem"                   Enables TLS if set
  *   CertificateFile "client-cert.pem"         optional
  *   CertificateKeyFile "client-key.pem"               optional
  *   TLSprotocol "tlsv1.2"             optional
@@ -612,7 +612,7 @@ static int mqtt_config_publisher (oconfig_item_t *ci)
             cf_util_get_boolean (child, &conf->store_rates);
         else if (strcasecmp ("Retain", child->key) == 0)
             cf_util_get_boolean (child, &conf->retain);
-        else if (strcasecmp ("CACertificateFile", child->key) == 0)
+        else if (strcasecmp ("CACert", child->key) == 0)
             cf_util_get_string (child, &conf->cacertificatefile);
         else if (strcasecmp ("CertificateFile", child->key) == 0)
             cf_util_get_string (child, &conf->certificatefile);