INN 2.4.0 core dumps

Russ Allbery rra at stanford.edu
Tue Feb 20 19:26:38 UTC 2001


Alexey Luckyanchikov <alexl at alkar.net> writes:

> I tried to install latest inn from CVS. After 10-15 minutes innd crash:

Whoops, I made a stupid mistake in integrating the timer code.  Try this
patch, which I'm committing now.

Index: timer.c
===================================================================
RCS file: /dist1/cvs/isc/inn/inn/lib/timer.c,v
retrieving revision 1.4
diff -u -r1.4 timer.c
--- timer.c	2001/02/20 00:56:15	1.4
+++ timer.c	2001/02/20 19:25:17
@@ -242,7 +242,9 @@
 void
 TMRstop(unsigned int timer)
 {
-    if (timer != timer_current->id)
+    if (timer_current == NULL)
+        warn("timer %u stopped when no timer was running", timer);
+    else if (timer != timer_current->id)
         warn("timer %u stopped doesn't match running timer %u", timer,
              timer_current->id);
     else {
@@ -290,12 +292,12 @@
         return 0;
     }
 
-    node->total = 0;
-    node->count = 0;
-    if (node->child != NULL)
-        off += TMRsumone(labels, node->child, buf + off, len - off);
-    if (node->brother != NULL)
-        off += TMRsumone(labels, node->brother, buf + off, len - off);
+    timer->total = 0;
+    timer->count = 0;
+    if (timer->child != NULL)
+        off += TMRsumone(labels, timer->child, buf + off, len - off);
+    if (timer->brother != NULL)
+        off += TMRsumone(labels, timer->brother, buf + off, len - off);
     return off;
 }

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>


More information about the inn-workers mailing list