瀏覽代碼

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
Thomas Guyot-Sionnest 19 年之前
父節點
當前提交
223da2af43
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 0
      THANKS.in
  2. 2 1
      plugins-root/check_icmp.c

+ 1 - 0
THANKS.in

@@ -213,3 +213,4 @@ Lars Stavholm
 Enrico Scholz
 Enrico Scholz
 Marlo Bell
 Marlo Bell
 Stefan Meier
 Stefan Meier
+Mark Favas

+ 2 - 1
plugins-root/check_icmp.c

@@ -395,7 +395,8 @@ main(int argc, char **argv)
 	environ = NULL;
 	environ = NULL;
 
 
 	/* use the pid to mark packets as ours */
 	/* 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); */
 	/* printf("pid = %u\n", pid); */
 
 
 	/* get calling name the old-fashioned way for portability instead
 	/* get calling name the old-fashioned way for portability instead