diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2007-03-27 06:53:57 (GMT) |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2007-03-27 06:53:57 (GMT) |
commit | 223da2af43da2ab67f175053ce29d88fdddf6c00 (patch) | |
tree | c04929eebaedf4aca3b12fde6f32062540a46173 | |
parent | ddd8e7e22e01a94326696d0e30a704d74c1a2f38 (diff) | |
download | monitoring-plugins-223da2af43da2ab67f175053ce29d88fdddf6c00.tar.gz |
Fix bug #1494629 - check_icmp fails after some time on FreeBSD
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1650 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r-- | THANKS.in | 1 | ||||
-rw-r--r-- | plugins-root/check_icmp.c | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -213,3 +213,4 @@ Lars Stavholm | |||
213 | Enrico Scholz | 213 | Enrico Scholz |
214 | Marlo Bell | 214 | Marlo Bell |
215 | Stefan Meier | 215 | Stefan Meier |
216 | Mark Favas | ||
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index 7a23e05..7e3b00f 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c | |||
@@ -395,7 +395,8 @@ main(int argc, char **argv) | |||
395 | environ = NULL; | 395 | environ = NULL; |
396 | 396 | ||
397 | /* use the pid to mark packets as ours */ | 397 | /* use the pid to mark packets as ours */ |
398 | pid = getpid(); | 398 | /* Some systems have 32-bit pid_t so mask off only 16 bits */ |
399 | pid = getpid() & 0xffff; | ||
399 | /* printf("pid = %u\n", pid); */ | 400 | /* printf("pid = %u\n", pid); */ |
400 | 401 | ||
401 | /* get calling name the old-fashioned way for portability instead | 402 | /* get calling name the old-fashioned way for portability instead |