From 4959697cfd6d1c08c98626232e8fd58bf7c074e1 Mon Sep 17 00:00:00 2001 From: Scott Sanders Date: Sun, 2 Oct 2011 16:28:32 -0400 Subject: [PATCH] Don't require a named backend Naming a backend adds no value to the configuration and only serves to complicate things. Multiple unamed carbon backends are still allowed. Documentation updated to reflect the change. --- src/write_graphite.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/write_graphite.c b/src/write_graphite.c index 64c7b434..e8bdc65c 100644 --- a/src/write_graphite.c +++ b/src/write_graphite.c @@ -24,7 +24,7 @@ /* write_graphite plugin configuation example * * - * + * * Host "localhost" * Port 2003 * Prefix "collectd" @@ -66,8 +66,6 @@ */ struct wg_callback { - char *name; - int sock_fd; struct hostent *server; @@ -210,7 +208,6 @@ static void wg_callback_free (void *data) wg_flush_nolock (/* timeout = */ 0, cb); close(cb->sock_fd); - sfree(cb->name); sfree(cb->host); sfree(cb->prefix); @@ -631,17 +628,12 @@ static int wg_config_carbon (oconfig_item_t *ci) memset (cb, 0, sizeof (*cb)); cb->sock_fd = -1; cb->host = NULL; - cb->name = NULL; cb->port = 2003; cb->prefix = NULL; cb->server = NULL; pthread_mutex_init (&cb->send_lock, /* attr = */ NULL); - config_set_string (&cb->name, ci); - if (cb->name == NULL) - return (-1); - for (i = 0; i < ci->children_num; i++) { oconfig_item_t *child = ci->children + i; -- 2.11.0