From df63654a68eeb2f11bb979d74706abcfdae85775 Mon Sep 17 00:00:00 2001 From: Dave West Date: Sat, 30 Jan 2010 16:11:50 +0000 Subject: [PATCH] Attempt to fix the crash that results from a new sessions context not existing before the command loop is entered. This fixes a theoretical non atomic opperation but does not seem to cause unwanted side effects. Lets see if it cures the problem on those systems that are seeing it regularly. --- citadel/sysdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/citadel/sysdep.c b/citadel/sysdep.c index 3d2db7da8..d3f13aba5 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -925,7 +925,7 @@ do_select: force_purge = 0; begin_critical_section(S_SESSION_TABLE); for (ptr = ContextList; ptr != NULL; ptr = ptr->next) { /* Dont select on dead sessions only truly idle ones */ - if ((ptr->state == CON_IDLE)) { + if ((ptr->state == CON_IDLE) && (CC->kill_me == 0)) { FD_SET(ptr->client_socket, &readfds); if (ptr->client_socket > highest) highest = ptr->client_socket; -- 2.30.2