other session which isn't being deleted (or NULL if there aren't any).
$Log$
+ Revision 620.34 2004/05/15 14:19:52 error
+ * Scheduler: when next_session is to be deleted, make it point to some
+ other session which isn't being deleted (or NULL if there aren't any).
+
Revision 620.33 2004/05/14 03:09:54 ajc
* When a session kills itself (for example, due to a broken socket),
force the dead_session_purge() to run immediately. This avoids
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
#endif
struct CitContext *ContextList = NULL;
+struct CitContext* next_session = NULL;
char *unique_session_numbers;
int ScheduledShutdown = 0;
int do_defrag = 0;
else {
for (ptr = ContextList; ptr != NULL; ptr = ptr->next) {
if (ptr->next == con) {
+ /* See fair scheduling in sysdep.c */
+ if (next_session == ptr->next)
+ next_session = ptr->next->next;
ToFree = ptr->next;
ptr->next = ptr->next->next;
--num_sessions;
int syslog_facility = (-1);
+/* This is synchronized below; it helps implement round robin mode */
+extern struct CitContext* next_session;
/*
* lprintf() ... Write logging information
int i;
char junk;
int highest;
- /* This is synchronized below; it helps implement round robin mode */
- static struct CitContext* next_session = NULL;
struct CitContext *ptr;
struct CitContext *bind_me = NULL;
fd_set readfds;