SOURCES: watchdog-debian.patch (NEW) - prevent reboots due to unit...

arekm arekm at pld-linux.org
Sun Jan 21 23:51:52 CET 2007


Author: arekm                        Date: Sun Jan 21 22:51:52 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- prevent reboots due to unitialized variable

---- Files affected:
SOURCES:
   watchdog-debian.patch (1.2 -> 1.3)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/watchdog-debian.patch
diff -u /dev/null SOURCES/watchdog-debian.patch:1.3
--- /dev/null	Sun Jan 21 23:51:52 2007
+++ SOURCES/watchdog-debian.patch	Sun Jan 21 23:51:47 2007
@@ -0,0 +1,41 @@
+--- watchdog-5.2.6.orig/src/test_binary.c
++++ watchdog-5.2.6/src/test_binary.c
+@@ -1,3 +1,5 @@
++/* $Header$ */
++
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+@@ -68,7 +70,7 @@
+ int check_bin(char *tbinary, time_t timeout)
+ {
+     pid_t child_pid;
+-    int result, res;
++    int result, res = 0;
+ 
+     if (timeout > 0)
+ 	    res = check_processes(timeout);
+--- watchdog-5.2.6.orig/src/watchdog.c
++++ watchdog-5.2.6/src/watchdog.c
+@@ -829,7 +829,8 @@
+ 	do_check(check_bin(tbinary, timeout), rbinary);
+ 
+ 	/* finally sleep some seconds */
+-	sleep(tint);
++	sleep((tint >> 1) + (tint % 2)); /* this should make watchdog sleep tint seconds alltogther */
++	/* sleep(tint); */
+ 
+ #if USE_SYSLOG
+ 	/* do verbose logging */
+--- watchdog-5.2.6.orig/src/iface.c
++++ watchdog-5.2.6/src/iface.c
+@@ -70,7 +70,7 @@
+ 			if (dev->parameter.iface.bytes == bytes) {
+ 				fclose(file);
+ #if USE_SYSLOG
+-		            	syslog(LOG_INFO, "device %s did not receive anything since last check", dev->name);
++		            	syslog(LOG_ERR, "device %s did not receive anything since last check", dev->name);
+ #endif   
+ 
+ 				return (ENETUNREACH);
+
================================================================


More information about the pld-cvs-commit mailing list