From: Florian Forster Date: Sun, 9 Jul 2006 08:16:15 +0000 (+0200) Subject: network: Be more verbose when `network_create_socket' failes due to a wrong `mode'. X-Git-Tag: collectd-3.10.0~11^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=40d25596e2ac99b7cd41520be10b8e3af257ece5;p=collectd.git network: Be more verbose when `network_create_socket' failes due to a wrong `mode'. On Sat, Jul 08, 2006 at 02:14:05PM +0000, Cryptronic wrote: > collectd[6889]: network_create_socket (zensoredip, 25826) failed if this is the only error you get, you most likely need to put Mode Client Somewhere before the `Listen' statement. --- diff --git a/src/network.c b/src/network.c index 54f9bfa3..22e911a8 100644 --- a/src/network.c +++ b/src/network.c @@ -215,7 +215,11 @@ int network_create_socket (const char *node, const char *service) DBG ("node = %s, service = %s", node, service); if (operating_mode == MODE_LOCAL || operating_mode == MODE_LOG) + { + syslog (LOG_WARNING, "network_create_socket: There is no point opening a socket when you are in mode `%s'.", + operating_mode == MODE_LOCAL ? "Local" : "Log"); return (-1); + } socklist_tail = socklist_head; while ((socklist_tail != NULL) && (socklist_tail->next != NULL))