Commit 614155f2 authored by David Byers's avatar David Byers

Initialize member structure before parsing.

parent a09ad53e
1999-05-24 David Byers <davby@ida.liu.se>
* src/server/ram-parse.c (fparse_member_list): Initialize member
structure before parsing it.
* src/server/memory.c (init_member): New function;
1999-05-24 Per Cederqvist <ceder@lysator.liu.se>
* Release 2.0.0.
......
/*
* $Id: kom-memory.h,v 1.12 1999/05/24 09:34:27 ceder Exp $
* $Id: kom-memory.h,v 1.13 1999/05/24 13:47:05 byers Exp $
* Copyright (C) 1991, 1993-1994, 1996-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -23,7 +23,7 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
/*
* $Id: kom-memory.h,v 1.12 1999/05/24 09:34:27 ceder Exp $
* $Id: kom-memory.h,v 1.13 1999/05/24 13:47:05 byers Exp $
*
* The time has come to get some order into this mess.
*
......@@ -66,6 +66,9 @@ extern void init_member_list (Member_list *ml);
/* Membership type */
extern void init_membership_type(Membership_type *m);
/* Member */
extern void init_member(Member *mem);
/* Membership */
extern void init_membership(Membership *m);
......
/*
* $Id: memory.c,v 0.34 1999/05/24 09:34:29 ceder Exp $
* $Id: memory.c,v 0.35 1999/05/24 13:47:06 byers Exp $
* Copyright (C) 1991-1994, 1996-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -33,7 +33,7 @@
#endif
static const char *
rcsid = "$Id: memory.c,v 0.34 1999/05/24 09:34:29 ceder Exp $";
rcsid = "$Id: memory.c,v 0.35 1999/05/24 13:47:06 byers Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -256,6 +256,22 @@ init_member_list (Member_list *ml)
ml->members = NULL;
}
/* Member */
void
init_member(Member *mem)
{
if (mem == NULL)
{
kom_log("init_member(): mem == NULL.\n");
return;
}
mem->member = 0;
mem->added_by = 0;
mem->added_at = NO_TIME;
init_membership_type(&mem->type);
}
/* Membership */
static void
......
/*
* $Id: ram-parse.c,v 0.35 1999/05/24 09:34:35 ceder Exp $
* $Id: ram-parse.c,v 0.36 1999/05/24 13:47:07 byers Exp $
* Copyright (C) 1991, 1993-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -35,7 +35,7 @@
#endif
static const char *
rcsid = "$Id: ram-parse.c,v 0.35 1999/05/24 09:34:35 ceder Exp $";
rcsid = "$Id: ram-parse.c,v 0.36 1999/05/24 13:47:07 byers Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -1594,10 +1594,13 @@ fparse_member_list(FILE *fp,
}
for ( i = 0; i < result->no_of_members; i++)
{
init_member(&result->members[i]);
if ( fparse_member(fp, &result->members[ i ]) != OK )
{
return FAILURE;
}
}
fskipwhite(fp);
......
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