From: Scott Sanders Date: Sun, 2 Oct 2011 20:28:32 +0000 (-0400) Subject: Don't require a named backend X-Git-Tag: collectd-5.1.0~35^2~25^2~12 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4959697cfd6d1c08c98626232e8fd58bf7c074e1;p=collectd.git 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. --- 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;