Commit b8ba9bbf authored by David Byers's avatar David Byers
Browse files

New membership data type. Multiple bug fixes

parent 6fdcfb3c
1998-06-10 David Byers <davby@ida.liu.se>
* src/server/membership.c (sub_member): Return KOM_NOT_MEMBER for
secret memberships.
1998-06-08 David Byers <davby@ida.liu.se>
* src/server/membership.c (set_membership_type): New function.
* src/server/prot-a-output.c (prot_a_output_membership): Output
added_at.
(prot_a_output_member): Output added_at
* src/server/membership.c (do_add_member): Set added_at.
(get_members): Filter out added_at.
* src/server/memory.c (init_membership): Init added_at.
* src/server/ram-output.c (foutput_member_2): Added output of
added_at.
* src/server/ram-parse.c (fparse_member_2): Added parsing of added_at.
* src/include/kom-types.h: Added added_at to Membership och Member.
* src/server/ram-parse.c (fparse_membership_2): Added parsning of
added_at.
* src/server/ram-output.c (foutput_membership_2): Added output of
added_at.
Fri Jan 16 22:51:52 1998 David Byers <davby@litefix.ida.liu.se>
* src/include/kom-types.h (Aux_item_flags): Added dont_garb.
* src/server/text-garb.c (garb_text): Check dont_garb aux-item
flag.
Mon Sep 22 19:06:05 1997 David Byers <davby@litefix.ida.liu.se> Mon Sep 22 19:06:05 1997 David Byers <davby@litefix.ida.liu.se>
* src/server/cache-node.h: New flags: snapshot and synced. * src/server/cache-node.h: New flags: snapshot and synced.
......
#! /bin/sh #! /bin/sh
# From configure.in Revision: 1.41 # From configure.in Revision: 1.42
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12 # Generated automatically using autoconf version 2.12
......
No preview for this file type
This diff is collapsed.
.\" $Id: lyskomd.8,v 1.25 1997/09/13 15:31:34 byers Exp $ .\" $Id: lyskomd.8,v 1.26 1998/06/14 14:50:23 byers Exp $
.\" Copyright (C) 1991, 1994 Lysator Academic Computer Association. .\" Copyright (C) 1991, 1994 Lysator Academic Computer Association.
.\" .\"
.\" This file is part of the LysKOM server. .\" This file is part of the LysKOM server.
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
.\" .\"
.\" Please mail bug reports to bug-lyskom@lysator.liu.se. .\" Please mail bug reports to bug-lyskom@lysator.liu.se.
.\" .\"
.\" $Id: lyskomd.8,v 1.25 1997/09/13 15:31:34 byers Exp $ .\" $Id: lyskomd.8,v 1.26 1998/06/14 14:50:23 byers Exp $
.\" $Date: 1997/09/13 15:31:34 $ .\" $Date: 1998/06/14 14:50:23 $
.TH lyskomd 8 "January 12, 1994" "Lysator" .TH lyskomd 8 "January 12, 1994" "Lysator"
.SH NAME .SH NAME
lyskomd - LysKOM server lyskomd - LysKOM server
...@@ -402,6 +402,23 @@ is not allowed to create any text number ...@@ -402,6 +402,23 @@ is not allowed to create any text number
.I T .I T
which meets the condition which meets the condition
.I T \% divident == remainder .I T \% divident == remainder
.TP
.B Add members by invitation: bool
If this is set, then adding others as members to a conference sets the
invitation bit of the membership. If this is off, the membership bit is
set to whatever the caller specifies. The default is to set this.
.TP
.B Allow secret memberships: bool
If this is set, then memberships may be secret. Otherwise any attempt
to create a secret membership or change an existing membership to a
secret membership will fail. This is set by default.
.TP
.B allow reinvitations: bool
If this is set, then it is possible to set the invitation bit of a
membership even after it has been cleared. If it is not set, then the
invitation bit of a conference type can only be set when the
membership is created. It can be cleared at any time. This is off by
default.
.SH SIGNALS .SH SIGNALS
There are some signals that have a special meaning to the LysKOM There are some signals that have a special meaning to the LysKOM
server. server.
......
# #
# $Id: aux-items.conf,v 1.2 1997/10/23 12:40:41 byers Exp $ # $Id: aux-items.conf,v 1.3 1998/06/14 14:50:24 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.
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
unique = true; unique = true;
secret = false; secret = false;
hide-creator = false; hide-creator = false;
dont-garb = false;
inherit = false; inherit = false;
inherit-limit = 1; inherit-limit = 1;
validate = "^.*/.*$"; validate = "^.*/.*$";
...@@ -53,6 +54,7 @@ ...@@ -53,6 +54,7 @@
{ {
secret = false; secret = false;
hide-creator = false; hide-creator = false;
dont-garb = false;
inherit = false; inherit = false;
inherit-limit = 1; inherit-limit = 1;
} }
...@@ -64,6 +66,7 @@ ...@@ -64,6 +66,7 @@
3 : cross-reference (text, conference) 3 : cross-reference (text, conference)
{ {
dont-garb = false;
inherit = false; inherit = false;
inherit-limit = 1; inherit-limit = 1;
validate = "^[CTP][0-9]+"; validate = "^[CTP][0-9]+";
...@@ -79,6 +82,7 @@ ...@@ -79,6 +82,7 @@
secret = false; secret = false;
hide-creator = false; hide-creator = false;
author-only = true; author-only = true;
dont-garb = false;
inherit = false; inherit = false;
inherit-limit = 1; inherit-limit = 1;
} }
...@@ -93,6 +97,7 @@ ...@@ -93,6 +97,7 @@
secret = false; secret = false;
hide-creator = false; hide-creator = false;
author-only = true; author-only = true;
dont-garb = false;
inherit = false; inherit = false;
inherit-limit = 1; inherit-limit = 1;
} }
...@@ -106,6 +111,7 @@ ...@@ -106,6 +111,7 @@
{ {
secret = false; secret = false;
unique = true; unique = true;
dont-garb = false;
inherit = false; inherit = false;
inherit-limit = 1; inherit-limit = 1;
} }
...@@ -119,6 +125,7 @@ ...@@ -119,6 +125,7 @@
{ {
secret = false; secret = false;
hide-creator = false; hide-creator = false;
dont-garb = false;
inherit = false; inherit = false;
inherit-limit = 1; inherit-limit = 1;
permanent = true; permanent = true;
...@@ -131,6 +138,7 @@ ...@@ -131,6 +138,7 @@
8 : redirect (conference) 8 : redirect (conference)
{ {
dont-garb = false;
supervisor-only = true; supervisor-only = true;
validate = "^(LysKOM|E-mail):"; validate = "^(LysKOM|E-mail):";
} }
...@@ -145,6 +153,7 @@ ...@@ -145,6 +153,7 @@
secret = false; secret = false;
hide-creator = false; hide-creator = false;
supervisor-only = true; supervisor-only = true;
dont-garb = false;
inherit = false; inherit = false;
inherit-limit = 1; inherit-limit = 1;
} }
...@@ -156,6 +165,7 @@ ...@@ -156,6 +165,7 @@
10 : alternate-name (text, conference) 10 : alternate-name (text, conference)
{ {
dont-garb = false;
inherit = false; inherit = false;
} }
...@@ -168,6 +178,7 @@ ...@@ -168,6 +178,7 @@
{ {
permanent = true; permanent = true;
hide-creator = false; hide-creator = false;
dont-garb = false;
inherit = false; inherit = false;
inherit-limit = 1; inherit-limit = 1;
} }
...@@ -181,6 +192,7 @@ ...@@ -181,6 +192,7 @@
{ {
author-only = true; author-only = true;
hide-creator = false; hide-creator = false;
dont-garb = false;
inherit = false; inherit = false;
inherit-limit = 1; inherit-limit = 1;
} }
...@@ -194,6 +206,25 @@ ...@@ -194,6 +206,25 @@
{ {
author-only = true; author-only = true;
hide-creator = false; hide-creator = false;
dont-garb = false;
inherit = false; inherit = false;
inherit-limit = 1; inherit-limit = 1;
} }
#
# FAQ in Text
#
14 : faq-text (conference, server)
{
author-only = true;
hide-creator = false;
secret = false;
dont-garb = false;
inherit = false;
inherit-limit = 1;
add-trigger = mark-text();
delete-trigger = unmark-text();
undelete-trigger= mark-text();
}
/* /*
* $Id: kom-errno.h,v 0.14 1997/09/13 15:31:39 byers Exp $ * $Id: kom-errno.h,v 0.15 1998/06/14 14:50:25 byers Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1996 Lysator Academic Computer Association. * Copyright (C) 1991, 1992, 1993, 1994, 1996 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -91,6 +91,7 @@ typedef enum ...@@ -91,6 +91,7 @@ typedef enum
KOM_INTERNAL_ERROR = 51, /* Internal server error */ KOM_INTERNAL_ERROR = 51, /* Internal server error */
KOM_FEATURE_DISABLED = 52, /* Server feature is disabled */ KOM_FEATURE_DISABLED = 52, /* Server feature is disabled */
KOM_MESSAGE_NOT_SENT = 53, /* Message not sent (no recipient found) */ KOM_MESSAGE_NOT_SENT = 53, /* Message not sent (no recipient found) */
KOM_INVALID_MEMBERSHIP_TYPE = 54, /* Invalid membership type */
KOM_num_errs /* End marker */ KOM_num_errs /* End marker */
} Kom_err; } Kom_err;
......
/* /*
* $Id: kom-types.h,v 0.24 1997/09/13 15:31:40 byers Exp $ * $Id: kom-types.h,v 0.25 1998/06/14 14:50:27 byers Exp $
* Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association. * Copyright (C) 1990, 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.
...@@ -224,7 +224,7 @@ typedef struct { ...@@ -224,7 +224,7 @@ typedef struct {
unsigned int inherit : 1; /* Copy to comments */ unsigned int inherit : 1; /* Copy to comments */
unsigned int secret : 1; /* Don't show anyone */ unsigned int secret : 1; /* Don't show anyone */
unsigned int hide_creator : 1; /* Don't show the creator */ unsigned int hide_creator : 1; /* Don't show the creator */
unsigned int reserved2 : 1; unsigned int dont_garb : 1; /* Don't garb object */
unsigned int reserved3 : 1; unsigned int reserved3 : 1;
unsigned int reserved4 : 1; unsigned int reserved4 : 1;
unsigned int reserved5 : 1; unsigned int reserved5 : 1;
...@@ -290,7 +290,22 @@ typedef struct { ...@@ -290,7 +290,22 @@ typedef struct {
typedef struct { typedef struct {
Pers_no member; Bool invitation : 1;
Bool passive : 1;
Bool secret : 1;
Bool reserved1 : 1;
Bool reserved2 : 1;
Bool reserved3 : 1;
Bool reserved4 : 1;
Bool reserved5 : 1;
} Membership_type;
typedef struct {
Pers_no member;
Pers_no added_by;
Time added_at;
Membership_type type;
} Member; } Member;
...@@ -304,6 +319,7 @@ typedef struct { ...@@ -304,6 +319,7 @@ typedef struct {
/* Information about a person's membership in a conference */ /* Information about a person's membership in a conference */
typedef struct { typedef struct {
Conf_no conf_no; Conf_no conf_no;
unsigned char priority; /* Interrupt priority */ unsigned char priority; /* Interrupt priority */
...@@ -314,6 +330,9 @@ typedef struct { ...@@ -314,6 +330,9 @@ typedef struct {
unsigned short no_of_read; unsigned short no_of_read;
Local_text_no * read_texts; /* Texts after last_text_read. Sorted Local_text_no * read_texts; /* Texts after last_text_read. Sorted
in ascending order */ in ascending order */
Pers_no added_by;
Time added_at;
Membership_type type;
} Membership; } Membership;
......
/* /*
* $Id: services.h,v 0.32 1997/09/13 15:31:41 byers Exp $ * $Id: services.h,v 0.33 1998/06/14 14:50:28 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.
...@@ -173,6 +173,13 @@ KOM_( get_created_texts (Pers_no person, ...@@ -173,6 +173,13 @@ KOM_( get_created_texts (Pers_no person,
unsigned long no_of_texts, unsigned long no_of_texts,
Text_list * created_texts )); Text_list * created_texts ));
extern Success
KOM_( get_membership_old (Pers_no person,
unsigned short first,
unsigned short no_of_confs,
Bool want_read_texts,
Membership_list * memberships ));
extern Success extern Success
KOM_( get_membership (Pers_no person, KOM_( get_membership (Pers_no person,
unsigned short first, unsigned short first,
...@@ -180,8 +187,6 @@ KOM_( get_membership (Pers_no person, ...@@ -180,8 +187,6 @@ KOM_( get_membership (Pers_no person,
Bool want_read_texts, Bool want_read_texts,
Membership_list * memberships )); Membership_list * memberships ));
extern Success extern Success
KOM_( set_priv_bits (Pers_no person, KOM_( set_priv_bits (Pers_no person,
Priv_bits privileges )); Priv_bits privileges ));
...@@ -197,6 +202,11 @@ KOM_( set_passwd (Pers_no person, ...@@ -197,6 +202,11 @@ KOM_( set_passwd (Pers_no person,
/* You can query for unread texts without logging in. */ /* You can query for unread texts without logging in. */
extern Success
KOM_( query_read_texts_old (Pers_no pers_no,
Conf_no conf_no,
Membership * result ));
extern Success extern Success
KOM_( query_read_texts (Pers_no pers_no, KOM_( query_read_texts (Pers_no pers_no,
Conf_no conf_no, Conf_no conf_no,
...@@ -306,7 +316,14 @@ extern Success ...@@ -306,7 +316,14 @@ extern Success
KOM_( get_members (Conf_no conf, KOM_( get_members (Conf_no conf,
unsigned short first, unsigned short first,
unsigned short no_of_members, unsigned short no_of_members,
Member_list * members )); Member_list * members
));
extern Success
KOM_( get_members_old (Conf_no conf,
unsigned short first,
unsigned short no_of_members,
Member_list * members ));
...@@ -315,7 +332,19 @@ extern Success ...@@ -315,7 +332,19 @@ extern Success
KOM_( add_member (Conf_no conf_no, KOM_( add_member (Conf_no conf_no,
Pers_no pers_no, Pers_no pers_no,
unsigned char priority, unsigned char priority,
unsigned short where )); /* Range of where is [0..] */ unsigned short where, /* Range of where is [0..] */
Membership_type * type ));
extern Success
KOM_( add_member_old (Conf_no conf_no,
Pers_no pers_no,
unsigned char priority,
unsigned short where )); /* Range of where is [0..] */
extern Success
KOM_( set_membership_type (Pers_no pers_no,
Conf_no conf_no,
Membership_type *type ));
extern Success extern Success
......
...@@ -161,7 +161,7 @@ fnc-def-init.incl: fnc-def-init.awk fncdef-no-str-limit.txt ...@@ -161,7 +161,7 @@ fnc-def-init.incl: fnc-def-init.awk fncdef-no-str-limit.txt
> fnc-def-init.incl > fnc-def-init.incl
aux-item-def.tab.c: aux-item-def.y aux-item-def.tab.c: aux-item-def.y
$(BISON) -d -p aux_item_def -o aux-item-def.tab.c aux-item-def.y $(BISON) -d -p aux_item_def_ -o aux-item-def.tab.c aux-item-def.y
aux-item-def.lex.c: aux-item-def.l aux-item-def.lex.c: aux-item-def.l
$(FLEX) -oaux-item-def.lex.c aux-item-def.l $(FLEX) -oaux-item-def.lex.c aux-item-def.l
......
# #
# $Id: Makefile.src,v 1.30 1997/09/13 15:31:45 byers Exp $ # $Id: Makefile.src,v 1.31 1998/06/14 14:50:31 byers Exp $
# Copyright (C) 1991, 1993, 1994, 1995, 1996 Lysator Academic Computer Association. # Copyright (C) 1991, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
# #
# This file is part of the LysKOM server. # This file is part of the LysKOM server.
...@@ -114,7 +114,7 @@ fnc-def-init.incl: fnc-def-init.awk fncdef-no-str-limit.txt ...@@ -114,7 +114,7 @@ fnc-def-init.incl: fnc-def-init.awk fncdef-no-str-limit.txt
> fnc-def-init.incl > fnc-def-init.incl
aux-item-def.tab.c: aux-item-def.y aux-item-def.tab.c: aux-item-def.y
$(BISON) -d -p aux_item_def -o aux-item-def.tab.c aux-item-def.y $(BISON) -d -p aux_item_def_ -o aux-item-def.tab.c aux-item-def.y
aux-item-def.lex.c: aux-item-def.l aux-item-def.lex.c: aux-item-def.l
$(FLEX) -oaux-item-def.lex.c aux-item-def.l $(FLEX) -oaux-item-def.lex.c aux-item-def.l
......
dbck: Fixa s} att membership-list och member-list st{mmer |verens.
-----------------
Borde ha en skedjuler f|r sync&garb. Sync&garb borde returnera antalet Borde ha en skedjuler f|r sync&garb. Sync&garb borde returnera antalet
millisekunder tills de skall bli anropade igen. Det minsta av dessa millisekunder tills de skall bli anropade igen. Det minsta av dessa
v{rden borde vara timeout till isc_getnextevent. v{rden borde vara timeout till isc_getnextevent.
......
/* /*
* $Id: admin.c,v 0.24 1997/09/13 15:31:47 byers Exp $ * $Id: admin.c,v 0.25 1998/06/14 14:50:34 byers Exp $
* Copyright (C) 1991, 1993, 1994, 1995, 1996 Lysator Academic Computer Association. * Copyright (C) 1991, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* Administrative calls. * Administrative calls.
*/ */
static char *rcsid = "$Id: admin.c,v 0.24 1997/09/13 15:31:47 byers Exp $"; static char *rcsid = "$Id: admin.c,v 0.25 1998/06/14 14:50:34 byers Exp $";
#include "rcs.h" #include "rcs.h"
USE(rcsid); USE(rcsid);
...@@ -268,6 +268,9 @@ send_message (Conf_no recipient, ...@@ -268,6 +268,9 @@ send_message (Conf_no recipient,
retval = FAILURE; retval = FAILURE;
for (ix = 0; ix < end; ix++) for (ix = 0; ix < end; ix++)
{ {
if (conf_c->members.members[ix].type.passive)
continue;
if (async_send_group_message(conf_c->members.members[ix].member, if (async_send_group_message(conf_c->members.members[ix].member,
recipient, recipient,
ACTPERS, ACTPERS,
...@@ -352,11 +355,16 @@ modify_server_info(Number_list *items_to_delete, ...@@ -352,11 +355,16 @@ modify_server_info(Number_list *items_to_delete,
if (check_delete_aux_item_list(items_to_delete, if (check_delete_aux_item_list(items_to_delete,
&kom_info.aux_item_list)!=OK) &kom_info.aux_item_list)!=OK)
return FAILURE; return FAILURE;
delete_aux_item_list(items_to_delete, &kom_info.aux_item_list); delete_aux_item_list(items_to_delete,
&kom_info.aux_item_list,
OTHER_OBJECT_TYPE,
0, NULL);
if (system_check_add_aux_item_list(&kom_info, items_to_add, ACTPERS) != OK) if (system_check_add_aux_item_list(&kom_info, items_to_add, ACTPERS) != OK)
{ {
undelete_aux_item_list(items_to_delete, &kom_info.aux_item_list); undelete_aux_item_list(items_to_delete, &kom_info.aux_item_list,
OTHER_OBJECT_TYPE,
0, NULL);
return FAILURE; return FAILURE;
} }
......
%{ %{
/* /*
* $Id: aux-item-def.l,v 1.1 1997/09/13 15:31:48 byers Exp $ * $Id: aux-item-def.l,v 1.2 1998/06/14 14:50: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.
...@@ -87,7 +87,16 @@ letterbox { ...@@ -87,7 +87,16 @@ letterbox {
} }
server { server {
yylloc.first_line = yylineno; yylloc.first_line = yylineno;
RETURN SERVER; RETURN TOK_SERVER;
}
create {
yylloc.first_line = yylineno;
RETURN CREATE;
}