Commit 047e64d5 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(EMPTY_CONNECTION, new_client, kill_client): Initialize/destruct the

fields as appropriate.
parent 1f2e5b2c
/*
* $Id: internal-connections.c,v 0.11 1993/01/16 23:16:34 ceder Exp $
* $Id: internal-connections.c,v 0.12 1993/08/05 01:15:30 ceder Exp $
* Copyright (C) 1991 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.11 1993/01/16 23:16:34 ceder Exp $";
static char *rcsid = "$Id: internal-connections.c,v 0.12 1993/08/05 01:15:30 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -53,16 +53,19 @@ INTERNAL Connection *last_conn = NULL;
INTERNAL const Connection EMPTY_CONNECTION =
((Connection){0, NULL, NULL,
/* Things used by services.c */
0, NULL, NO_TIME, 0,
EMPTY_STRING_i, 0,
(Pers_no)0, (Person *)NULL, NO_TIME, (Conf_no)0,
EMPTY_STRING_i, (u_char)0,
EMPTY_STRING_i, EMPTY_STRING_i, EMPTY_STRING_i,
EMPTY_STRING_i, EMPTY_STRING_i,
FALSE, FALSE,
/* Used by server/connections.c */
NULL, '\0',
0, 0, 0, 0, 0, 0, 0,
(struct mux*)NULL, '\0',
0, 0, 0, 0, 0,
0, call_fnc_login_old,
/* Gather data... */
0, 0, 0, 0, EMPTY_STRING_i, EMPTY_STRING_i,
EMPTY_STRING_i, NULL, NULL, DEFAULT_PRIV_BITS_i,
EMPTY_STRING_i, (Misc_info*)NULL,
(Local_text_no*)NULL, DEFAULT_PRIV_BITS_i,
NULL_CONF_TYPE_i, EMPTY_tm_i,
/* Protocol independent... */
EMPTY_STRING_i, 0, FALSE,
......@@ -119,6 +122,8 @@ new_client(void)
c->ena_level = 0;
c->username = EMPTY_STRING;
c->ident_user = EMPTY_STRING;
c->client_name = EMPTY_STRING;
c->client_version = EMPTY_STRING;
c->invisible = FALSE;
c->username_valid = FALSE;
......@@ -166,6 +171,8 @@ kill_client(Connection *cp)
s_clear(&cp->username);
s_clear(&cp->hostname);
s_clear(&cp->ident_user);
s_clear(&cp->client_name);
s_clear(&cp->client_version);
if ( cp->mux != NULL )
{
......
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