From: Florian Forster Date: Sat, 13 Jan 2007 15:42:04 +0000 (+0100) Subject: src/configfile.c: Removed `cf_callback_socket' X-Git-Tag: collectd-4.0.0-rc4~161 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ec6fec62b15992b22774233c6a915e46673b25af;p=collectd.git src/configfile.c: Removed `cf_callback_socket' .. since the network stuff is now implemented as a plugin. --- diff --git a/src/configfile.c b/src/configfile.c index 8fe42876..5472de4e 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -375,48 +375,6 @@ static int cf_callback_mode_loadmodule (const char *shortvar, const char *var, return (LC_CBRET_OKAY); } -static int cf_callback_socket (const char *shortvar, const char *var, - const char *arguments, const char *value, lc_flags_t flags, - void *extra) -{ - char *buffer; - - char *fields[3]; - int numfields; - - char *node; - char *service = NET_DEFAULT_PORT; - - DEBUG_CALLBACK (shortvar, var, arguments, value); - - buffer = strdup (value); - if (buffer == NULL) - return (LC_CBRET_ERROR); - - numfields = strsplit (buffer, fields, 3); - - if ((numfields != 1) && (numfields != 2)) - { - syslog (LOG_ERR, "Invalid number of arguments to `%s'", - shortvar); - free (buffer); - return (LC_CBRET_ERROR); - } - - node = fields[0]; - if (numfields == 2) - service = fields[1]; - - /* Still return `LC_CBRET_OKAY' because this is not an syntax error */ - if (network_create_socket (node, service) < 1) - syslog (LOG_ERR, "network_create_socket (%s, %s) failed", - node, service); - - free (buffer); - - return (LC_CBRET_OKAY); -} - /* * `cf_callback_plugin' * Start/end section `plugin' @@ -523,11 +481,6 @@ static void cf_init (void) lc_register_callback ("LoadPlugin", SHORTOPT_NONE, LC_VAR_STRING, cf_callback_mode_loadmodule, NULL); - lc_register_callback ("Listen", SHORTOPT_NONE, - LC_VAR_STRING, cf_callback_socket, NULL); - lc_register_callback ("Server", SHORTOPT_NONE, - LC_VAR_STRING, cf_callback_socket, NULL); - for (i = 0; i < cf_mode_num; i++) { cf_mode_item_t *item;