Commit 9f674c7f authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(init_connection): Added static const qualifiers to the

	default_want_async variable.  Initialize penalty,
	penalty_generation, queue_next, queue_prev, on_queue.
(kill_client): Assert that on_queue is false.
parent 3bb2edec
/*
* $Id: internal-connections.c,v 0.53 2003/03/15 22:30:05 ceder Exp $
* $Id: internal-connections.c,v 0.54 2003/07/12 00:17:55 ceder Exp $
* Copyright (C) 1991-1994, 1996-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -37,6 +37,7 @@
#include <time.h>
#include <setjmp.h>
#include <sys/types.h>
#include <assert.h>
#include "exp.h"
#include "s-string.h"
......@@ -69,7 +70,7 @@ static int no_of_allocated_connections = 0;
static void
init_connection(Connection *conn)
{
enum async default_want_async[] = ASYNC_DEFAULT_MESSAGES;
static const enum async default_want_async[] = ASYNC_DEFAULT_MESSAGES;
int i;
conn->prev = NULL;
......@@ -128,9 +129,15 @@ init_connection(Connection *conn)
conn->unparsed = EMPTY_STRING;
conn->first_to_parse = 0;
conn->more_to_parse = FALSE;
conn->penalty = 0;
conn->penalty_generation = 0;
conn->active_time = current_time;
conn->session_no = 0;
conn->queue_next = NULL;
conn->queue_prev = NULL;
conn->on_queue = FALSE;
conn->info.pers_pres_conf = 0;
conn->info.conf_pres_conf = 0;
conn->info.motd_conf = 0;
......@@ -268,6 +275,8 @@ kill_client(Connection *cp)
cp->session_no);
}
assert(cp->on_queue == FALSE);
if ( !s_empty(cp->c_string0) || !s_empty(cp->c_string1)
|| !s_empty(cp->string0) )
{
......
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