Commit d631e6ab authored by David Byers's avatar David Byers

Added position field to membership, keep_commented to Conference.

parent b57cb701
1999-01-12 David Byers <davby@ida.liu.se>
* src/server/testsuite/lyskomd.0/03.exp: Updated membership tests.
* src/server/testsuite/lyskomd.0/05.exp: Updated membership tests.
* src/server/membership.c (do_get_membership): Set the position
field in the returned structure.
(locate_membership_and_position): Removed.
(locate_membership): Set the position field in the membership.
* src/server/memory.c (init_membership): Init position field.
* src/include/kom-types.h: Removed Extended_Membership. Added
position field to Membership.
* src/server/connections.h: Removed Extended_Membership.
* src/server/prot-a.c (prot_a_reply): Removed
rt_extended_membership.
* src/server/prot-a-output.c (prot_a_output_membership): Output
membership position.
1999-01-08 David Byers <davby@ida.liu.se>
* db-crypt/db/lyskomd-data: Updated database with keep_commented
field.
1999-01-07 David Byers <davby@ida.liu.se>
* src/server/person.c (create_person_generic): Initialize
keep_commented.
* src/server/memory.c (copy_conference): Copy keep_commented.
(init_conference): Initialize keep_commented.
* src/server/dbck.c (delete_misc): Moved initialization of ready
to avoid spurious compiler warning.
* src/server/text.c (do_delete_misc): Moved initialization of
ready to avoid spurious compiler warning.
* src/server/simple-cache.c: Changed sync_next to unsigned to get
rid of compiler warnings.
(save_one_conf): Output sync_next as unsigned.
(save_one_text): Ditto.
(init_cache): Move initialization of done, read_text_no and
read_conf_no to avoit spurious compiler warning.
(init_cache): Initialize c for same reason.
* src/server/cache-node.c: Added initializer for s.snapshot in
EMPTY_CACHE_NODE.
* src/server/cache-node.h: Removed saved_sirty [sic] flag from
cache_node. It wasn't used anywhere.
* src/include/rcs.h (USE): Use __typeof__ to avoid compiler
warnings. This macro only does something when __GCC__ is two or
more, in which case __typeof__ exists, so it should be safe.
* src/server/server-config.c: Added default_keep_commented to
parameters.
* src/server/param.h: Added default_keep_commented to kom_par.
* src/server/conference.c (do_create_conf): Initialize
keep_commented
* doc/lyskomd.texi (Parameters): Documented Default keep commented
nice.
* src/include/services.h: Declare set_keep_commented.
* src/server/conference.c (set_keep_commented): New function.
* src/server/fncdef.txt: Added set_keep_commented.
* src/server/prot-a-output.c (prot_a_output_conference): Output
keep_commented after nice.
* src/server/ram-parse.c (fparse_conference_2): Parse
keep_commented.
* src/include/kom-types.h: New field keep_commented.
* src/server/ram-output.c (foutput_conference_2): Output
keep_commented.
1999-01-01 Per Cederqvist <ceder@gratia>
Use NO_TIME instead of 0.
......
Changes in lyskomd 2.0.0 (Release date TBD)
--------------------------------------------------
* The database format has changed again. Old installations must
convert their old database -- see INSTALL for instructions.
* Portability fixes. This release compiles cleanly on systems that
define errno as a macro.
* It is now possible to attach arbitrary data to conferences and
texts. This allows simple extensions to server data structures
without requiring protocol changes. These data object are called
aux-items, and are configured with the aux-items.conf file.
* It is now possible to see when a membership was added and by whom.
Memberships come in several different flavors through the addition
of a membership type. Currently defined types are secret, passive
and invitation.
* The conference type has been extended so that it is possible to
forbid secret members in the conference.
* Regexp matching is now case insensitive by default. Case sensitivity
is configurable.
* A new recipient type, BCC recipient, has been added. BCC recipients
are only shown to potential members of the recipient and to the
sender.
* The server can send asynchronous messages about texts being deleted;
recipients being added and removed; and memberships being added.
This should help clients with caches to keep them updated.
* There is a call to get the collate table being used by the server.
* The error status field is now set to something semi-useful in all
calls.
* There is a new parameter (keep_commented) on conferences for tuning
the garbage collection process. This tuning is not implemented in
the server, but users and clients are encouraged to start using the
tuning parameter anyway since the tuning will be implemented in the
new feature.
* There is a parameter (expire) for configuring automatic removal of
inactive conferences. This removal is currently not implemented, but
users and clients are encouraged to start using it anyway and the
automatic conference deletion procedure will be implemented in the
near future.
* Documentation has been moved to an info file. The man pages are no
longer maintained.
* The protocol documentation is more detailed, converted to info and
written in English.
* Mapping of local text numbers to global text numbers is now much
more efficient, which should lead to significant performace
improvements if clients make use of these facilities.
* Sanity checks in database and protocol code increase stability and
resilience to client errors and sabotage.
* We now use GNU automake.
* The distribution contains a test suite that is used for regression
testing the server in development. The testsuite should run with no
unexpeced failures.
Changes in lyskomd 1.9.0 (Release date 1996-08-04)
--------------------------------------------------
......
......@@ -6,6 +6,10 @@ Before the next release
These are show-stoppers that prevent a new release.
* There's a long-standing memory leak, probably in ISC. It appears to
happen when we queue up lots of junk to clients that have died.
Trace what happens if we do isc_oflush and hit the E2BIG bit.
* Newline terminates requests. Check that a wording similar to that
in 1509862 is present in Protocol-A.texi.
......@@ -18,17 +22,12 @@ These are show-stoppers that prevent a new release.
* disconnect(0) should disconnect the current session. (806239)
* Should we really retain deleted aux-items indefinitely? (3490203)
* Should the error message be named conference-zero or
zero-conference? (Protocol-A.texi)
* 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
membership type? Probably yes.
membership type? Probably yes. Maybe no.
* Missing test cases in 03.exp
......@@ -37,12 +36,19 @@ These are show-stoppers that prevent a new release.
surviving comments. Did anybody object? /ceder)
I think the current behavior is so deeply entrenched that we
shouldn't change the it. Leave it alone.
shouldn't change the it. Leave it alone. -- DCB
I still think it would be better to remove the automatic login,
but you might be able to persuade me differently. /ceder
* Test the code for memory leaks.
* Read 45110, 45121, 45284 again and incorporate selected comments in
this document.
* Read all texts in LysKOM (-) Systemet, protokollet mm created after
1991 (start at text 170527) and incorporate selected information in
this document.
* Test the code for memory leaks in malloc. smalloced memory is fine!
* Improve the file format for local-to-global.c.
......@@ -76,45 +82,19 @@ These are show-stoppers that prevent a new release.
* Fix dbck so that it can repair Member<->Membership inconsistencies.
DONE. Needs to be tested though.
* Implement a test suite that tests all calls successfully at least
once.
RESOLVED.
* Should the error message be named conference-zero or
zero-conference? (Protocol-A.texi)
RESOLVED: conference-zero
* 52=get-unread-confs should ignore conferences where you are a
passive member.
DONE.
* ceder thinks that the sender of a BCC recipient group should be
allowed to see it, so that the sender can see when the recipient has
read the text. (3380375, 3381048)
RESOLVED.
* ceder suspects that a BCC recipient group should be visible to anybody
that may become a member of the BCC recipient (as opposed to all
members and all administrators), lest everybody starts to be passive
members of every conference just to be able to see BCC recipients.
(3380375, 3381048)
RESOLVED.
As soon as possible
High priority, but they can wait until after the next release.
* Fix Nisse's text garbing procedure. See doc/IDEAS for details.
* Check the FIXME in cached_conf_exists. I am certain that the
necessary changes to cached_delete_conf are done, and almost sure
that no other changes are required (checked where s.exists is set to
zero for existing confs, and that is only in init_cache and
cached_delete_conf. See ChangeLog entry for Sat Sep 13
(simple-cache.c). -- DCB
* Proof-read Protocol-A.texi.
* Consider implementing aux-infos that are the "reverse" of a Mark, of
......@@ -132,6 +112,8 @@ High priority, but they can wait until after the next release.
* Define and implement asynchronous messages for cache inconsitency.
This is partially done. -- DCB
* Add a checksum on each object in the database.
* The text-mass file should contain some redundancy. At a minimum, it
......@@ -146,6 +128,10 @@ High priority, but they can wait until after the next release.
* Document the mark bits. (6390, 24358, 24444, 40876, 42356, 45110,
1111605, 2687219)
Better still, implement a more complex mark structure rather than
using the current mark number as a bitfield. We need to be able to
see what marks are set on a given text. -- DCB
* Document the user area.
* Fix case errors in type names etc (3267160).
......@@ -172,14 +158,26 @@ Lower priority than the above-mentioned things.
* Some generalized way to query the server for (unread) texts with a
certain aux-item set. (see 21415 for motivation)
* Write a "lyskomd hackers guide" (requested in 24684).
* Write a "lyskomd hackers guide" (requested in 24684).
* Tree-structure for the conferences (41768).
* Tree-structure for the conferences (41768).
Yay! See the IDEAS file for some concrete ideas on how to do this.
-- DCB.
* Don't include so much information in the Person and Conference
structures internally in the server. A Conference is (probably)
used much more often than the large internal lists within it.
For active conferences, the l2g map is probably used a lot. However
the created-texts map for a person is not used a lot. The read-texts
part of memberships get updated a lot. For maximum gains we probably
have to split off the created-texts map and make is possible to read
individual memberships from disk. The entire thing should be hidden
from most of the server by automatically reading bits of maps or
memberships on demand from disk. High-level functions shouldn't have
to know about this.
* Create a "server hackers guide" and move the contents of
doc/server.extend (and several other files in the doc directory) to
it. The "server hackers guide" should probably be an appendix of
......@@ -240,9 +238,43 @@ Lower priority than the above-mentioned things.
implement that using a special aux-info and automatic adding of a
bcc-recpt by the server to the new comment.
Fixed
=====
* Fix dbck so that it can repair Member<->Membership inconsistencies.
DONE. Needs to be tested though.
* Implement a test suite that tests all calls successfully at least
once.
RESOLVED.
* Should the error message be named conference-zero or
zero-conference? (Protocol-A.texi)
RESOLVED: conference-zero
* 52=get-unread-confs should ignore conferences where you are a
passive member.
DONE.
* ceder thinks that the sender of a BCC recipient group should be
allowed to see it, so that the sender can see when the recipient has
read the text. (3380375, 3381048)
RESOLVED.
* ceder suspects that a BCC recipient group should be visible to anybody
that may become a member of the BCC recipient (as opposed to all
members and all administrators), lest everybody starts to be passive
members of every conference just to be able to see BCC recipients.
(3380375, 3381048)
RESOLVED.
* Mention explicitly in the protocol spec that the cient cannot send
"0 *" to the server.
......@@ -307,7 +339,7 @@ Fixed
* The Membership that is returned by 98=query-read-texts should
include the position of the Membership.
Whatever. Done.
Absolutely. Done. Did the same for get-membership.
* Write a Texinfo manual for lyskomd based on the man pages.
......@@ -318,3 +350,9 @@ Fixed
in Protocol-A.texi.
Done.
* Should we really retain deleted aux-items indefinitely? (3490203)
No, and we don't any more.
No preview for this file type
/*
* $Id: kom-types.h,v 0.29 1998/12/26 22:40:18 byers Exp $
* $Id: kom-types.h,v 0.30 1999/01/13 12:08:20 byers Exp $
* Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -321,27 +321,21 @@ typedef struct {
/* Information about a person's membership in a conference */
typedef struct {
Conf_no conf_no;
unsigned char priority; /* Interrupt priority */
Time last_time_read; /* Updated every time a text in this
unsigned long position;
Conf_no conf_no;
unsigned char priority; /* Interrupt priority */
Time last_time_read; /* Updated every time a text in this
conf. is marked as read. */
Local_text_no last_text_read; /* All texts before and inclusive this
Local_text_no last_text_read; /* All texts before and inclusive this
are read */
unsigned short no_of_read;
Local_text_no * read_texts; /* Texts after last_text_read. Sorted
in ascending order */
Pers_no added_by;
Time added_at;
Membership_type type;
unsigned short no_of_read;
Local_text_no * read_texts; /* Texts after last_text_read. Sorted
in ascending order */
Pers_no added_by;
Time added_at;
Membership_type type;
} Membership;
/* Information about a membership and its location */
typedef struct {
unsigned long position;
Membership membership;
} Extended_Membership;
/* Some structs to handle variable-sized arrays. */
......@@ -472,6 +466,7 @@ typedef struct {
conf is referenced by the user. */
Garb_nice nice; /* How long do texts in this
conf live? */
Garb_nice keep_commented; /* New comments protect texts */
Garb_nice expire; /* When do we auto-kill this */
String name; /* Name of conference */
unsigned long highest_aux;
......
/*
* $Id: rcs.h,v 1.4 1995/11/02 21:54:10 ceder Exp $
* $Id: rcs.h,v 1.5 1999/01/13 12:08:21 byers Exp $
* Copyright (C) 1993, 1995 Lysator Academic Computer Association.
*
* This file is part of the LysKOM system.
......@@ -29,10 +29,10 @@
#if ____GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
#define USE(var) \
static void * use_##var __attribute__ ((unused)) = (void *) &var
static __typeof__(var) *use_##var __attribute__ ((unused)) = &var
#elif __GNUC__ == 2
#define USE(var) \
static void * use_##var = (&use_##var, (void *) &var)
static __typeof__(var) *use_##var = (&use_##var, &var)
#else
#define USE(var)
#endif
/*
* $Id: services.h,v 0.38 1998/12/26 22:40:19 byers Exp $
* $Id: services.h,v 0.39 1999/01/13 12:08:22 byers Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -216,7 +216,7 @@ KOM_( query_read_texts_old (Pers_no pers_no,
extern Success
KOM_( query_read_texts (Pers_no pers_no,
Conf_no conf_no,
Extended_Membership * result ));
Membership * result ));
extern Success
......@@ -413,6 +413,11 @@ KOM_( set_expire (Conf_no conf_no,
Garb_nice expire )); /* number of days */
extern Success
KOM_ ( set_keep_commented(Conf_no conf_no,
Garb_nice keep_commented)); /* number of days */
/********************************
* Calls to handle marks *
......
/*
* $Id: cache-node.c,v 0.17 1998/12/26 22:40:29 byers Exp $
* $Id: cache-node.c,v 0.18 1999/01/13 12:08:23 byers Exp $
* Copyright (C) 1991, 1993, 1994, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -34,7 +34,7 @@
#endif
static const char *
rcsid = "$Id: cache-node.c,v 0.17 1998/12/26 22:40:29 byers Exp $";
rcsid = "$Id: cache-node.c,v 0.18 1999/01/13 12:08:23 byers Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -50,7 +50,7 @@ USE(rcsid);
#include "lyskomd.h"
EXPORT const Cache_node EMPTY_CACHE_NODE =
{{ 0, 0}, NULL, NULL, 0, 0, 0, 0, NULL, NULL, 0};
{{ 0, 0, 0 }, NULL, NULL, 0, 0, 0, 0, NULL, NULL, 0};
EXPORT const Cache_node_block EMPTY_CACHE_NODE_BLOCK =
{ 0, NULL, NULL};
......
/*
* $Id: cache-node.h,v 0.11 1997/10/23 12:37:22 byers Exp $
* $Id: cache-node.h,v 0.12 1999/01/13 12:08:24 byers Exp $
* Copyright (C) 1991, 1993, 1994, 1995 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: cache-node.h,v 0.11 1997/10/23 12:37:22 byers Exp $
* $Id: cache-node.h,v 0.12 1999/01/13 12:08:24 byers Exp $
*
* cache-node.h
*/
......@@ -33,7 +33,6 @@ typedef struct cache_node {
unsigned int exists : 1;
unsigned int dirty : 1; /* Is *ptr modified? */
unsigned int snapshot : 1; /* We have a valid snapshot */
unsigned int saved_sirty : 1; /* Saved a dirty copy */
} s;
void *snap_shot; /* Dirty data to be written to file B. */
/* (Dirty relative to file A). */
......
/*
* $Id: conference.c,v 0.41 1998/12/26 22:40:30 byers Exp $
* $Id: conference.c,v 0.42 1999/01/13 12:08:24 byers Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -35,7 +35,7 @@
static const char *
rcsid = "$Id: conference.c,v 0.41 1998/12/26 22:40:30 byers Exp $";
rcsid = "$Id: conference.c,v 0.42 1999/01/13 12:08:24 byers Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -300,6 +300,7 @@ do_create_conf(String name,
conf_c->last_written= conf_c->creation_time;
conf_c->msg_of_day = 0;
conf_c->nice = param.default_nice;
conf_c->keep_commented = param.default_keep_commented;
conf_c->highest_aux = 0;
conf_c->expire = 0;
......@@ -1149,6 +1150,36 @@ set_expire( Conf_no conf_no,
return OK;
}
/*
* Set expire for a conference. This controls nothing at the moment, but
* will probably control when a conference is killed automatically by
* the server in cases of extreme inactivity.
*/
extern Success
set_keep_commented(Conf_no conf_no,
Garb_nice keep_commented) /* number of days */
{
Conference * conf_c;
Access acc;
CHK_LOGIN(FAILURE);
GET_C_STAT(conf_c, conf_no, FAILURE);
acc = access_perm (conf_no, conf_c, ACTPERS, ACT_P);
if ( acc < unlimited )
{
err_stat = conf_no;
kom_errno = (acc <= none) ? KOM_UNDEF_CONF : KOM_PERM;
return FAILURE;
}
conf_c->keep_commented = keep_commented;
mark_conference_as_changed( conf_no );
return OK;
}
/*
* Change presentation of a conference. If text_no is 0, there will be
* no presentation.
......
/*
* $Id: connections.h,v 0.34 1998/12/26 22:40:32 byers Exp $
* $Id: connections.h,v 0.35 1999/01/13 12:08:25 byers Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 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: connections.h,v 0.34 1998/12/26 22:40:32 byers Exp $
* $Id: connections.h,v 0.35 1999/01/13 12:08:25 byers Exp $
*
* connections.h -- The top level of the communication packet.
*
......@@ -179,8 +179,7 @@ typedef enum {
rt_conference,
rt_info,
rt_l2g_iterator_as_text_list,
rt_text_mapping,
rt_extended_membership
rt_text_mapping
} Res_type;
/*
......@@ -197,7 +196,6 @@ typedef union {
Person person;
Membership membership;
Membership membership_old;
Extended_Membership extended_membership;
Conf_list_old conf_list;
Conf_no_list conf_no_list;
Conference conference;
......
/*
* $Id: dbck.c,v 0.42 1998/12/26 22:40:35 byers Exp $
* $Id: dbck.c,v 0.43 1999/01/13 12:08:26 byers Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -35,7 +35,7 @@
static const char *
rcsid = "$Id: dbck.c,v 0.42 1998/12/26 22:40:35 byers Exp $";
rcsid = "$Id: dbck.c,v 0.43 1999/01/13 12:08:26 byers Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -382,7 +382,7 @@ delete_misc (Text_stat *tstat,
{
int del = 1; /* Number of items to delete. */
/* Always delete at least one item. */
Bool ready;
Bool ready = FALSE;
/* Check range of misc */
......@@ -392,8 +392,6 @@ delete_misc (Text_stat *tstat,
restart_kom("delete_misc() - misc out of range\n");
}
ready = FALSE;
while (ready == FALSE
&& misc + del < tstat->misc_items + tstat->no_of_misc )
{
......
#
# $Id: fncdef.txt,v 0.34 1998/12/26 22:40:37 byers Exp $
# $Id: fncdef.txt,v 0.35 1999/01/13 12:08:27 byers Exp $
# Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997
# Lysator Academic Computer Association.
#
......@@ -23,7 +23,7 @@
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
#
# $Id: fncdef.txt,v 0.34 1998/12/26 22:40:37 byers Exp $
# $Id: fncdef.txt,v 0.35 1999/01/13 12:08:27 byers Exp $
#
# This file is used to describe the functions in services.c. All
# functions that are reachable from the clients are listed here, together
......@@ -165,10 +165,11 @@ success get_info : info
success modify_server_info num_list (param.max_delete_aux) aux_item_list (param.max_add_aux)
success query_predefined_aux_items : num_list