changeset 27734:5c49b0be3b7b

(stop_other_atimers): Don't call cancel_atimer because that unblocks alarms.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 17 Feb 2000 13:12:27 +0000
parents d6a89b95b32d
children 8ba487d5d956
files src/atimer.c
diffstat 1 files changed, 17 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/atimer.c	Thu Feb 17 12:15:05 2000 +0000
+++ b/src/atimer.c	Thu Feb 17 13:12:27 2000 +0000
@@ -214,11 +214,23 @@
 
   if (t)
     {
-      cancel_atimer (t);
-      if (free_atimers != t)
-	abort ();
-      free_atimers = free_atimers->next;
-      t->next = NULL;
+      struct atimer *p, *prev;
+      
+      /* See if T is active.  */
+      for (p = atimers, prev = 0; p && p != t; p = p->next)
+	;
+
+      if (p == t)
+	{
+	  if (prev)
+	    prev->next = t->next;
+	  else
+	    atimers = t->next;
+	  t->next = NULL;
+	}
+      else
+	/* T is not active.  Let's handle this like T == 0.  */
+	t = NULL;
     }
   
   stopped_atimers = atimers;