X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Ftcpconns.c;h=78c337b7687ee3e7fcc3af4ee06e437513444b04;hb=da93b3172489e2eb51a93b0ab2238247a16c8e5b;hp=02241f3d55e94721eb42ca90cb77ec80c6283182;hpb=5b17ea02b681f681e30db9e0359633d987949b50;p=collectd.git diff --git a/src/tcpconns.c b/src/tcpconns.c index 02241f3d..78c337b7 100644 --- a/src/tcpconns.c +++ b/src/tcpconns.c @@ -116,7 +116,11 @@ # include # include # include -# include +# if !defined(HAVE_BSD_NLIST_H) || !HAVE_BSD_NLIST_H +# include +# else /* HAVE_BSD_NLIST_H */ +# include +# endif # include #endif /* HAVE_LIBKVM_NLIST */ @@ -220,7 +224,6 @@ static void conn_submit_port_entry (port_entry_t *pe) vl.values = values; vl.values_len = 1; - vl.time = time (NULL); sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "tcpconns", sizeof (vl.plugin)); sstrncpy (vl.type, "tcp_connections", sizeof (vl.type)); @@ -455,9 +458,7 @@ static int conn_config (const char *key, const char *value) { if (strcasecmp (key, "ListeningPorts") == 0) { - if ((strcasecmp (value, "Yes") == 0) - || (strcasecmp (value, "True") == 0) - || (strcasecmp (value, "On") == 0)) + if (IS_TRUE (value)) port_collect_listening = 1; else port_collect_listening = 0;