X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Ftcpconns.c;h=4db6f8ac4ba73e5f75354ab5ebea076b2f65e490;hb=52f41fed6e32f66f5817a82ae175fd443084f8a3;hp=d39a6c32d4e1ce828e9f6de516f3999b7124b220;hpb=7471e073bff7c9f2542bc1c8ce639b85c5498ba7;p=collectd.git diff --git a/src/tcpconns.c b/src/tcpconns.c index d39a6c32..4db6f8ac 100644 --- a/src/tcpconns.c +++ b/src/tcpconns.c @@ -1,6 +1,7 @@ /** * collectd - src/tcpconns.c - * Copyright (C) 2007 Florian octo Forster + * Copyright (C) 2007,2008 Florian octo Forster + * Copyright (C) 2008 Michael Stapelberg * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -17,6 +18,7 @@ * * Author: * Florian octo Forster + * Michael Stapelberg **/ /** @@ -213,7 +215,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)); @@ -585,7 +586,8 @@ static int conn_read (void) && ((inp->inp_vflag & INP_IPV6) == 0)) continue; - conn_handle_ports (inp->inp_lport, inp->inp_fport, tp->t_state); + conn_handle_ports (ntohs (inp->inp_lport), ntohs (inp->inp_fport), + tp->t_state); } /* for (in_ptr) */ in_orig = NULL;