Commit e8ead205 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(go_and_die): Now a Bool, once again.

(check_idle_callback): Break out of the loop and return OOP_HALT
	if go_and_die is true.
parent 5b323c14
/*
* $Id: connections.c,v 0.98 2003/07/13 11:07:24 ceder Exp $
* $Id: connections.c,v 0.99 2003/07/13 11:56:27 ceder Exp $
* Copyright (C) 1991-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -94,7 +94,7 @@ Connection * active_connection = NULL;
* privileges issues a `shutdown', or of lyskomd receives a SIGHUP.
* This not an abort: all data is saved before we exit.
*/
volatile sig_atomic_t go_and_die = 0;
Bool go_and_die = FALSE;
/*
* The number of times that the session penalties has been averaged.
......@@ -907,7 +907,7 @@ check_idle_callback(oop_source *UNUSED(source),
is_idle = FALSE;
++penalty_generation;
for (next = queue_first; next != NULL; )
for (next = queue_first; next != NULL && !go_and_die; )
{
c = next;
next = next->queue_next;
......@@ -924,7 +924,8 @@ check_idle_callback(oop_source *UNUSED(source),
if (!is_idle)
enable_idle_check();
return OOP_CONTINUE;
/* Check if a client issued a shutdown command. */
return go_and_die ? OOP_HALT : OOP_CONTINUE;
}
static void *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment