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 9c02ce6..12891fb 100644 (file)
 
 #<Plugin write_riemann>
 #      <Node "example">
-#              Host "localhost">
+#              Host "localhost"
 #              Port 5555
 #              StoreRates true
 #      </Node>
index cd0132d..33fb0a5 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 {