Code

write_riemann plugin: Fix two bugs in the example configuration.
authorFlorian Forster <octo@collectd.org>
Tue, 22 Jan 2013 18:07:13 +0000 (19:07 +0100)
committerFlorian Forster <octo@collectd.org>
Tue, 22 Jan 2013 18:07:13 +0000 (19:07 +0100)
Remove a trailing ">" from the example config and use the correct config
item to configure the "StoreRates" option.

src/collectd.conf.in
src/write_riemann.c

index 9c02ce603a07993e0a3e292727c781d0946ffa78..12891fb6e7d97172b7955ceaf6f77af5dfd6848a 100644 (file)
 
 #<Plugin write_riemann>
 #      <Node "example">
-#              Host "localhost">
+#              Host "localhost"
 #              Port 5555
 #              StoreRates true
 #      </Node>
index cd0132d28c30a9855035e36cb89b4334c4304ae1..33fb0a55fd7761d9af56d90b167749c22a9935aa 100644 (file)
@@ -448,7 +448,7 @@ riemann_connect(struct riemann_host *host)
 
        memset(&hints, 0, sizeof(hints));
        memset(&service, 0, sizeof(service));
-       hints.ai_family = PF_UNSPEC;
+       hints.ai_family = AF_UNSPEC;
        hints.ai_socktype = SOCK_DGRAM;
 #ifdef AI_ADDRCONFIG
        hints.ai_flags |= AI_ADDRCONFIG;
@@ -579,7 +579,7 @@ riemann_config_node(oconfig_item_t *ci)
                                break;
                        }
                } else if (strcasecmp ("StoreRates", child->key) == 0) {
-                       status = cf_util_get_boolean (ci, &host->store_rates);
+                       status = cf_util_get_boolean (child, &host->store_rates);
                        if (status != 0)
                                break;
                } else {