Mark scheduler task unscheduled after silc_schedule_unset_listen_fd.
authorPekka Riikonen <priikone@silcnet.org>
Thu, 10 Apr 2008 15:03:46 +0000 (18:03 +0300)
committerPekka Riikonen <priikone@silcnet.org>
Thu, 10 Apr 2008 15:03:46 +0000 (18:03 +0300)
Affects epoll() version of schduler.  If it isn't marked unscheduled
next time fd's events are changed they expect the fd to be in epoll()
which they are not.  Setting unscheduled will add them again to epoll().

lib/silcutil/unix/silcunixschedule.c

index 0856358764ec216f67c5c5dfa7e9872f3c7b8ed3..80e8fbf264e9a471a1732ef98b1c3c7546f8f65e 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1998 - 2007 Pekka Riikonen
+  Copyright (C) 1998 - 2008 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -288,6 +288,7 @@ SilcBool silc_schedule_internal_schedule_fd(SilcSchedule schedule,
       SILC_LOG_DEBUG(("epoll_ctl (DEL): %s", strerror(errno)));
       return FALSE;
     }
+    task->scheduled = FALSE;
     return TRUE;
   }