Commit 0cfe0807 authored by David Byers's avatar David Byers

Bug fixes

parent 33ae5742
1998-12-30 David Byers <davby@ida.liu.se>
* src/server/aux-items.h: Removed ADD_AUX_ITEM macro.
* src/server/aux-items.c (aux_inherit_items): Fixed memory leak.
* src/server/ramkomd.c (free_kom_info): New function.
(main): Call it so that memory usage reported at end of session is
not dependent on the length of the aux-item list attached to
kom_info since that messes up testing for memory leaks.
* doc/lyskomd.texi: Added this file. Finished writing it too.
1998-12-29 David Byers <davby@ida.liu.se> 1998-12-29 David Byers <davby@ida.liu.se>
* src/server/testsuite/config/unix.exp (lyskomd_start): Added * src/server/testsuite/config/unix.exp (lyskomd_start): Added
......
...@@ -6,6 +6,10 @@ Before the next release ...@@ -6,6 +6,10 @@ Before the next release
These are show-stoppers that prevent a new release. These are show-stoppers that prevent a new release.
* Remove the man pages for lyskomd.
* Add the dbck reference to the lyskomd manual. Remove the man pages.
* Should the conference supervisor be able to set the secret bit of a * Should the conference supervisor be able to set the secret bit of a
membership type? Probably yes. membership type? Probably yes.
...@@ -32,9 +36,6 @@ These are show-stoppers that prevent a new release. ...@@ -32,9 +36,6 @@ These are show-stoppers that prevent a new release.
* Improve the file format for local-to-global.c. Warning: this will * Improve the file format for local-to-global.c. Warning: this will
cause an incompatible change in the database format. cause an incompatible change in the database format.
* Write a Texinfo manual for lyskomd based on the man pages. Remove
the man pages.
* Merge all changes done to prot-A.txt into Protocol-A.texi. * Merge all changes done to prot-A.txt into Protocol-A.texi.
* Document 103=local_to_global * Document 103=local_to_global
...@@ -57,9 +58,6 @@ These are show-stoppers that prevent a new release. ...@@ -57,9 +58,6 @@ These are show-stoppers that prevent a new release.
* The protocol revision section of Protocol-A.info is incomplete. * The protocol revision section of Protocol-A.info is incomplete.
* The redirect aux-info needs more documentation. See FIXME comment
in Protocol-A.texi.
* Check that texinfo.tex is included in a proper place by automake. * Check that texinfo.tex is included in a proper place by automake.
...@@ -224,3 +222,12 @@ Fixed ...@@ -224,3 +222,12 @@ Fixed
Whatever. Done. Whatever. Done.
* Write a Texinfo manual for lyskomd based on the man pages.
Done. Whee!
* The redirect aux-info needs more documentation. See FIXME comment
in Protocol-A.texi.
Done.
# $Id: Makefile.am,v 1.5 1998/08/29 18:28:53 ceder Exp $ # $Id: Makefile.am,v 1.6 1998/12/30 17:39:29 byers Exp $
# Copyright (C) 1998 Lysator Academic Computer Association. # Copyright (C) 1998 Lysator Academic Computer Association.
# #
# This file is part of the LysKOM server. # This file is part of the LysKOM server.
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
SUBDIRS = man SUBDIRS = man
info_TEXINFOS = Protocol-A.texi info_TEXINFOS = Protocol-A.texi lyskomd.texi
EXTRA_DIST = ADMINISTRATION misc_items prot-A.txt \ EXTRA_DIST = ADMINISTRATION misc_items prot-A.txt \
server-async.extend server.extend what-is-unread.swe \ server-async.extend server.extend what-is-unread.swe \
......
\input texinfo @c -*-texinfo-*- \input texinfo @c -*-texinfo-*-
@c $Id: Protocol-A.texi,v 1.46 1998/12/29 13:18:45 byers Exp $ @c $Id: Protocol-A.texi,v 1.47 1998/12/30 17:39:30 byers Exp $
@c %**start of header @c %**start of header
@setfilename protocol-a.info @setfilename protocol-a.info
@settitle LysKOM Protocol A @settitle LysKOM Protocol A
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
@ifinfo @ifinfo
This is the specification of LysKOM Protocol A v. 9.0 This is the specification of LysKOM Protocol A v. 9.0
Copyright @copyright{} 1995, 1996 Lysator ACS. Copyright @copyright{} 1995-1999 Lysator ACS.
Permission is granted to make and distribute verbatim copies of this Permission is granted to make and distribute verbatim copies of this
specification provided the copyright notice and this permission notice specification provided the copyright notice and this permission notice
...@@ -40,7 +40,7 @@ are preserved on all copies. ...@@ -40,7 +40,7 @@ are preserved on all copies.
@page @page
@vskip 0pt plus 1filll @vskip 0pt plus 1filll
Copyright @copyright{} 1995 Lysator ACS Copyright @copyright{} 1995-1999 Lysator ACS
Permission is granted to make and distribute verbatim copies of this document Permission is granted to make and distribute verbatim copies of this document
provided the copyright notice and this permission notice are preserved on all provided the copyright notice and this permission notice are preserved on all
......
/* /*
* $Id: aux-items.c,v 1.7 1998/12/26 22:40:27 byers Exp $ * $Id: aux-items.c,v 1.8 1998/12/30 17:39:34 byers Exp $
* Copyright (C) 1994, 1995, 1996 Lysator Academic Computer Association. * Copyright (C) 1994, 1995, 1996 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -694,7 +694,12 @@ aux_inherit_items(Aux_item_list *target, ...@@ -694,7 +694,12 @@ aux_inherit_items(Aux_item_list *target,
if (item.inherit_limit != 0) if (item.inherit_limit != 0)
item.inherit_limit -= 1; item.inherit_limit -= 1;
ADD_AUX_ITEM(*target, item, *counter); target->items = srealloc(target->items,
(target->length + 1) * sizeof(Aux_item));
target->items[target->length] = item;
*counter += 1;
target->items[target->length].aux_no = *counter;
target->length += 1;
aux_item_call_add_triggers(def, aux_item_call_add_triggers(def,
object_type, object_type,
......
/* /*
* $Id: aux-items.h,v 1.5 1998/12/26 22:40:28 byers Exp $ * $Id: aux-items.h,v 1.6 1998/12/30 17:39:35 byers Exp $
* Copyright (C) 1994, 1995, 1996 Lysator Academic Computer Association. * Copyright (C) 1994, 1995, 1996 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -38,22 +38,6 @@ ...@@ -38,22 +38,6 @@
#define AUX_IS_PREDEFINED(x) (((x) >= AUX_PREDEFINED_MIN && (x) <= AUX_PREDEFINED_MAX) || (x) > AUX_EXPERIMENTAL_MAX) #define AUX_IS_PREDEFINED(x) (((x) >= AUX_PREDEFINED_MIN && (x) <= AUX_PREDEFINED_MAX) || (x) > AUX_EXPERIMENTAL_MAX)
/*
* Add aux item ITEM to Aux_item_list LIST. COUNTER is the highest aux_no
* in the list (counter + 1 is the next aux_no
*/
#define ADD_AUX_ITEM(list, item, counter) \
{ \
(list).items = \
srealloc((list).items, \
((list).length + 1) * sizeof(Aux_item)); \
copy_aux_item(&(list).items[(list).length], &item); \
(counter) += 1; \
(list).items[(list).length].aux_no = (counter); \
(list).length += 1; \
}
/* Valid values for text_a etc. */ /* Valid values for text_a etc. */
......
/* /*
* $Id: ramkomd.c,v 0.70 1998/12/26 22:40:59 byers Exp $ * $Id: ramkomd.c,v 0.71 1998/12/30 17:39:36 byers Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association. * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#endif #endif
static const char * static const char *
rcsid = "$Id: ramkomd.c,v 0.70 1998/12/26 22:40:59 byers Exp $"; rcsid = "$Id: ramkomd.c,v 0.71 1998/12/30 17:39:36 byers Exp $";
#include "rcs.h" #include "rcs.h"
USE(rcsid); USE(rcsid);
...@@ -103,6 +103,7 @@ USE(rcsid); ...@@ -103,6 +103,7 @@ USE(rcsid);
#include "manipulate.h" #include "manipulate.h"
#include "version-info.h" #include "version-info.h"
#include "aux-items.h" #include "aux-items.h"
#include "admin.h"
#include "unused.h" #include "unused.h"
#if defined(HAVE_SETRLIMIT) && defined(RLIMIT_OFILE) && !defined(RLIMIT_NOFILE) #if defined(HAVE_SETRLIMIT) && defined(RLIMIT_OFILE) && !defined(RLIMIT_NOFILE)
...@@ -123,6 +124,7 @@ static IscSession *listen_client = NULL; /* ISC listen identifier */ ...@@ -123,6 +124,7 @@ static IscSession *listen_client = NULL; /* ISC listen identifier */
static IscSession *listen_mux = NULL; /* -"- */ static IscSession *listen_mux = NULL; /* -"- */
static void dump_exit_statistics(void); static void dump_exit_statistics(void);
static void free_kom_info(void);
static void static void
server_init (char * client_port, char * mux_port) server_init (char * client_port, char * mux_port)
...@@ -505,6 +507,7 @@ main (int argc, ...@@ -505,6 +507,7 @@ main (int argc,
isc_shutdown(kom_server_mcb); isc_shutdown(kom_server_mcb);
cache_sync_all(); cache_sync_all();
free_kom_info();
dump_exit_statistics(); dump_exit_statistics();
log("%s terminated normally.\n", argv[0]); log("%s terminated normally.\n", argv[0]);
...@@ -550,3 +553,20 @@ dump_exit_statistics(void) ...@@ -550,3 +553,20 @@ dump_exit_statistics(void)
dump_isc_alloc_counts(stat_file); dump_isc_alloc_counts(stat_file);
fclose (stat_file); fclose (stat_file);
} }
static void
free_kom_info(void)
{
unsigned long i;
if (kom_info.aux_item_list.items != NULL)
{
for (i = 0; i < kom_info.aux_item_list.length; i++)
{
s_clear(&kom_info.aux_item_list.items[i].data);
}
sfree(kom_info.aux_item_list.items);
}
kom_info.aux_item_list.length = 0;
kom_info.aux_item_list.items = 0;
}
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