Code

Fix bug #1494629 - check_icmp fails after some time on FreeBSD
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>
Tue, 27 Mar 2007 06:53:57 +0000 (06:53 +0000)
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>
Tue, 27 Mar 2007 06:53:57 +0000 (06:53 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1650 f882894a-f735-0410-b71e-b25c423dba1c

THANKS.in
plugins-root/check_icmp.c

index 9b72b26fb9abe87311f18c78937520f34050b847..6d674bc4728d58eb45fe8b0f4c61ac1ad813a52f 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
@@ -213,3 +213,4 @@ Lars Stavholm
 Enrico Scholz
 Marlo Bell
 Stefan Meier
+Mark Favas
index 7a23e05a880c3b5f323f9f0960e1c84186b82ef2..7e3b00f36a0a2f6b887e0433ef4868f7b453ff74 100644 (file)
@@ -395,7 +395,8 @@ main(int argc, char **argv)
        environ = NULL;
 
        /* use the pid to mark packets as ours */
-       pid = getpid();
+       /* Some systems have 32-bit pid_t so mask off only 16 bits */
+       pid = getpid() & 0xffff;
        /* printf("pid = %u\n", pid); */
 
        /* get calling name the old-fashioned way for portability instead