Commit 8fd9c05d authored by David Byers's avatar David Byers
Browse files

(init_connection): Initialize want_async; handle num_list field in Connection

parent a543ede7
/*
* $Id: internal-connections.c,v 0.21 1996/06/09 13:54:31 byers Exp $
* $Id: internal-connections.c,v 0.22 1996/06/14 15:49:40 byers Exp $
* Copyright (C) 1991, 1992, 1993, 1994 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* Abstract routines on the data type Connection.
*/
static char *rcsid = "$Id: internal-connections.c,v 0.21 1996/06/09 13:54:31 byers Exp $";
static char *rcsid = "$Id: internal-connections.c,v 0.22 1996/06/14 15:49:40 byers Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -50,6 +50,7 @@ USE(rcsid);
#include "server/smalloc.h"
#include "lyskomd.h"
#include "log.h"
#include "async.h"
#include "kom-memory.h"
INTERNAL Connection *all_connections = NULL;
......@@ -64,6 +65,9 @@ static int no_of_allocated_connections = 0;
static void
init_connection(Connection *conn)
{
Async default_want_async[] = ASYNC_DEFAULT_MESSAGES;
int i;
conn->magic = 0;
conn->prev = NULL;
conn->next = NULL;
......@@ -112,6 +116,17 @@ init_connection(Connection *conn)
conn->info.motd_of_lyskom = 0;
conn->info.version = 0;
conn->num_list.length = 0;
conn->num_list.data = NULL;
for (i = 0; i < ay_dummy_last; i++)
conn->want_async[i] = 0;
for (i = 0;
i < sizeof(default_want_async)/sizeof(*default_want_async);
i++)
conn->want_async[default_want_async[i]] = 1;
init_priv_bits(&conn->priv_bits);
init_conf_type(&conn->conf_type);
init_struct_tm(&conn->time);
......
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