From: Dave West Date: Sat, 30 Jan 2010 16:11:50 +0000 (+0000) Subject: Attempt to fix the crash that results from a new sessions context X-Git-Tag: v7.86~473 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=df63654a68eeb2f11bb979d74706abcfdae85775;p=citadel.git 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. --- 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;