projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial support of GPSd in collectd.
[collectd.git]
/
src
/
tcpconns.c
diff --git
a/src/tcpconns.c
b/src/tcpconns.c
index
b6a3fdd
..
5d4bb69
100644
(file)
--- a/
src/tcpconns.c
+++ b/
src/tcpconns.c
@@
-982,7
+982,9
@@
static int conn_read (void)
#endif
{
/* Read the pcb pointed to by `next' into `inpcb' */
#endif
{
/* Read the pcb pointed to by `next' into `inpcb' */
- kread ((u_long) next, &inpcb, sizeof (inpcb));
+ status = kread ((u_long) next, &inpcb, sizeof (inpcb));
+ if (status != 0)
+ return (-1);
/* Advance `next' */
#if defined(__OpenBSD__) || (defined(__NetBSD_Version__) && __NetBSD_Version__ > 699002700)
/* Advance `next' */
#if defined(__OpenBSD__) || (defined(__NetBSD_Version__) && __NetBSD_Version__ > 699002700)
@@
-1005,7
+1007,9
@@
static int conn_read (void)
continue;
#endif
continue;
#endif
- kread ((u_long) inpcb.inp_ppcb, &tcpcb, sizeof (tcpcb));
+ status = kread ((u_long) inpcb.inp_ppcb, &tcpcb, sizeof (tcpcb));
+ if (status != 0)
+ return (-1);
conn_handle_ports (ntohs(inpcb.inp_lport), ntohs(inpcb.inp_fport), tcpcb.t_state);
} /* while (next != head) */
conn_handle_ports (ntohs(inpcb.inp_lport), ntohs(inpcb.inp_fport), tcpcb.t_state);
} /* while (next != head) */