From 1c72a0f3c8a52bbbc6916d513bb1c1975abc0f29 Mon Sep 17 00:00:00 2001 From: Gerrie Roos Date: Tue, 20 Dec 2011 06:30:59 +0200 Subject: [PATCH] network plugin: Fixed incorrect collectd warning when configuring network plugin. Cosmetic only Change-Id: I4c4c8fe19c23e9aa31b35e61eba31aa686429c10 Signed-off-by: Florian Forster --- src/network.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/network.c b/src/network.c index 8de557d2..700b27f0 100644 --- a/src/network.c +++ b/src/network.c @@ -1683,9 +1683,9 @@ static int network_set_interface (const sockent_t *se, const struct addrinfo *ai } /* else: Not a multicast interface. */ -#if defined(HAVE_IF_INDEXTONAME) && HAVE_IF_INDEXTONAME && defined(SO_BINDTODEVICE) if (se->interface != 0) { +#if defined(HAVE_IF_INDEXTONAME) && HAVE_IF_INDEXTONAME && defined(SO_BINDTODEVICE) char interface_name[IFNAMSIZ]; if (if_indextoname (se->interface, interface_name) == NULL) @@ -1702,20 +1702,21 @@ static int network_set_interface (const sockent_t *se, const struct addrinfo *ai sstrerror (errno, errbuf, sizeof (errbuf))); return (-1); } - } /* #endif HAVE_IF_INDEXTONAME && SO_BINDTODEVICE */ #else - WARNING ("network plugin: Cannot set the interface on a unicast " + WARNING ("network plugin: Cannot set the interface on a unicast " "socket because " # if !defined(SO_BINDTODEVICE) - "the the \"SO_BINDTODEVICE\" socket option " + "the \"SO_BINDTODEVICE\" socket option " # else "the \"if_indextoname\" function " # endif "is not available on your system."); #endif + } + return (0); } /* }}} network_set_interface */ -- 2.30.2