summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6345047)
raw | patch | inline | side by side (parent: 6345047)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 13 Jan 2007 15:42:04 +0000 (16:42 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 13 Jan 2007 15:42:04 +0000 (16:42 +0100) |
.. since the network stuff is now implemented as a plugin.
src/configfile.c | patch | blob | history |
diff --git a/src/configfile.c b/src/configfile.c
index 8fe428760ce6ba493ecfaf22c0c5029fff7b2809..5472de4e3e18d3a927289f9d6c5425ee88b70386 100644 (file)
--- a/src/configfile.c
+++ b/src/configfile.c
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'
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;