Commit 6ee9dcb0 authored by David Byers's avatar David Byers
Browse files

Documentation updates:

        Merged lyskomd.texi, hacking.texi and dbck.texi
        Added what-is-unread.swe to Protocol-A.texi

Aux-items:
        Handle disabled item types in a cleaner manner.
        Fixed bugs related to linked aux items. This feature
        should work pretty well now.
        Added test cases to test linking aux items.
parent 32965bf8
...@@ -5,6 +5,38 @@ ...@@ -5,6 +5,38 @@
lyskomd.0/08.exp. lyskomd.0/08.exp.
* src/server/testsuite/lyskomd.0/08.exp: New file. * src/server/testsuite/lyskomd.0/08.exp: New file.
1999-05-18 David Byers <davby@ida.liu.se>
* doc/lyskomd.texi: Merged dbck.texi and hacking.texi into
lyskomd.texi.
* src/server/testsuite/lyskomd.0/03.exp: Updated
query-predefined-aux-items result.
* src/server/testsuite/lyskomd.0/01.exp: Updated
query-predefined-aux-items result.
* src/server/aux-items.c (undelete_aux_item_list): Fixed
conference/text mixup
(delete_aux_item_list): Same here.
(undelete_aux_item_list): Save kom_errno and err_stat across call.
* src/server/aux-item-def-parse.y: Deal with disabled definitions
in a more sensible manner.
* src/server/aux-items.c (aux_item_add_perm): Check the disabled
field of the aux-item definition.
* src/server/aux-items.h: Added disabled field.
1999-05-17 David Byers <davby@ida.liu.se>
* src/server/aux-items.c (aux_item_list_add_items): New utility
function.
(system_add_aux_item_list): Use aux_item_list_add_items.
(text_stat_add_aux_item_list): Use aux_item_list_add_items.
(conf_stat_add_aux_item_list): Use aux_item_list_add_items.
1999-05-16 Per Cederqvist <ceder@lysator.liu.se> 1999-05-16 Per Cederqvist <ceder@lysator.liu.se>
Use a global variable to store the current time, so that it is Use a global variable to store the current time, so that it is
...@@ -111,6 +143,24 @@ ...@@ -111,6 +143,24 @@
* src/server/ram-smalloc.c: Don't test USE_GNU_MALLOC; that symbol * src/server/ram-smalloc.c: Don't test USE_GNU_MALLOC; that symbol
was removed 1998-08-09. was removed 1998-08-09.
1999-05-16 David Byers <davby@ida.liu.se>
* src/server/aux-items.c (prepare_aux_item): Don't clear the link
field of the aux item.
(aux_inherit_items): Clear the link in the copied item before
calling add triggers.
(aux_item_link_items): New function.
(aux_item_trigger_mirror_faq): Use aux_item_link_items.
(aux_item_trigger_link_item): Use aux_item_link_items.
(aux_item_call_add_triggers): Fix the trigger data after calling
each trigger since one of them might move the aux item list in
memory.
1999-05-15 David Byers <davby@ida.liu.se>
* src/server/aux-items.c (aux_item_trigger_link_item): New
function for debugging linking aux items.
1999-05-14 Per Cederqvist <ceder@lysator.liu.se> 1999-05-14 Per Cederqvist <ceder@lysator.liu.se>
Fixes to the test suite. Fixes to the test suite.
...@@ -143,6 +193,116 @@ ...@@ -143,6 +193,116 @@
(lyskomd_fail_start): Likewise. Find the database files relative (lyskomd_fail_start): Likewise. Find the database files relative
to top_srcdir. to top_srcdir.
1999-05-14 David Byers <davby@ida.liu.se>
* src/server/text.c (do_create_text): Return long-array if there
are too many misc items.
(modify_text_info): Set err_stat to max length when returning
KOM_LONG_ARRAY.
* src/include/kom-types.h (Info_datum): Added unknown_type to
union.
* src/server/text.c (find_recipient): Add unknown_info to the
switch. Stop the server if COMPILE_CHECKS is undefined.
(is_member_in_recpt): Same here.
(do_delete_misc): Same here.
(do_sub_recpt): Same here.
(sender): Same here.
(is_sender): Same here.
(is_comm_sender): Same here.
(skip_recp): Same here.
(recp_sent_by): Same here.
(filter_secret_info): Same here.
(do_delete_text): Same here.
(check_double_subm): Same here.
(check_double_comm): Same here.
(create_text_check_misc): Return an illegal-info-typye if we see
an unknown info. Set err_stat to the index of the bad item when
returning a KOM_ILL_MISC.
(create_text_add_miscs): Same here.
* src/server/prot-a.c (prot_a_destruct): Free the misc_info_list
field of the connection.
* src/server/membership.c (add_rec_time): Handle unknown_info and
other unknown misc info types by shutting down the server.
* src/server/call-switch.awk: Add support for misc_info_list in
fncdef.txt.
* src/server/text.c (create_text_old): Changed parameter list to
use Misc_info_list instead of an integer and a Misc_info pointer.
(create_text): Same here.
(create_anonymous_text): Same here.
(create_anonymous_text_old): Same here.
* src/server/fncdef.txt: Changed all "num c_misc_info_p" to
misc_info_list.
* src/server/prot-a-parse-arg-c.awk: The aux_item type works again.
Allow misc_info_list as a type name.
* src/server/prot-a-parse.c (prot_a_parse_misc_info_list): New
function.
* src/server/prot-a.c (prot_a_init): Initialize the misc_info_list
field.
* src/server/internal-connections.c (kill_client): Use
misc_info_list field of Connection.
* src/server/connections.c (free_parsed): Clear the misc_info_list
field.
* src/include/kom-types.h (Misc_info_list): New type
* src/server/internal-connections.c (init_connection): Initialize
hunt_parse_pos, array_hunt_depth and array_hunt_num. Initialize
misc_info_list.
* src/server/prot-a-parse.c (prot_a_hunt_array_end): New function
hunts for the end of an array.c
* src/server/prot-a.c (prot_a_init): Initialize hunt_parse_pos and
array_hunt_num.
* src/include/kom-types.h (Info_type): Added unknown info type.
* src/server/prot-a-parse.c (prot_a_parse_misc_info): Parse all
misc-info types that the server knows about. Unknown types
generate a protocol error.
* src/server/testsuite/lyskomd.0/prot-a-parse-cov.exp (1021):
Expcet long-array and not protocol-error.
* src/server/prot-a-parse.c (prot_a_parse_aux_item_list): Discard
the part of the list that is longer than the max rather than send
a protocol error.
1999-05-13 David Byers <davby@ida.liu.se>
* src/server/testsuite/lyskomd.0/prot-a-parse-cov.exp
(protocol_error): Removed expected failure.
* src/server/admin.c (modify_server_info): Return KOM_LONG_ARRAY
when we see a long array.
* src/server/conference.c (modify_conf_info): Return
KOM_LONG_ARRAY when we see a long array.
* src/server/text.c (modify_text_info): Return KOM_LONG_ARRAY when
we see a long array.
* src/server/prot-a-parse.c (prot_a_parse_num_list): Truncate a
parsed array to one more than the maximum length and skip all
other elements.
* src/server/aux-items.c (undelete_aux_item_list): Log if the link
type is undefined and do not attempt to undelete.
(delete_aux_item_list): Likewise.
1999-05-13 Per Cederqvist <ceder@gratia> 1999-05-13 Per Cederqvist <ceder@gratia>
Distribute the leaks tests, and run them during "make check". Distribute the leaks tests, and run them during "make check".
......
...@@ -9,11 +9,13 @@ Testfall f ...@@ -9,11 +9,13 @@ Testfall f
* Showstoppers * Showstoppers
** Make sure that there are no "expected failures" in the test suite.
** Consider changing many paths so that it is safe to install lyskomd ** Consider changing many paths so that it is safe to install lyskomd
with prefix=/usr/local. with prefix=/usr/local.
How about saving this for the next release and then support
various other path conventions?
** Consider removing the pid file on exit. ** Consider removing the pid file on exit.
** Consider locking the database, so that dbck cannot do harm, and so ** Consider locking the database, so that dbck cannot do harm, and so
...@@ -29,25 +31,36 @@ Testfall f ...@@ -29,25 +31,36 @@ Testfall f
** Documentation Issues ** Documentation Issues
*** Document "%%Unsupported protocol" message
*** Document "%% No connections left" message
*** Remove the text "In all likelihood, the implementation of this flag *** Remove the text "In all likelihood, the implementation of this flag
is screwed up." from lyskomd.texi after checking that is screwed up." from lyskomd.texi after checking that
supervisor-only works properly. supervisor-only works properly.
*** Move dbck.texi, hacking.tex and lyskomdb.texi into lyskomd.texi. *** Document updateLysKOM in lyskomd.texi.
Two reasons: there are too many manuals, and automake apparently There should be an "Invoking updateLysKOM" node.
doesn't allow more than one file to include version.texi. updateLysKOM should use the "Status file" parameter (and other
parameters). (DONE)
Use parameters in src/server/updateLysKOM.c`savecore(). (DONE)
I will do this --ceder
*** Fix doc/lyskomdb.texi (Version 1) (see FIXME comments). *** Document komrunning in lyskomd.texi.
There should be an "Invoking komrunning" node.
komrunning should be rewritten i C; it only works with BSD-style ps
programs. (DONE, but it no longer displays the process)
I am doing this --ceder
*** Dump all little doc files into the texinfo manuals. *** Dump all little doc files into the texinfo manuals.
Remaining:
disc-cache.spec lyskomd.texi översätt, uppdatera
local-to-global.doc lyskomd.texi ceder?
prot-a-tankar *
prot_a *
security-levels.txt Protocol-A.texi DONE
what-is-unread.swe Protocol-A.texi DONE
I will do this --DCB I will do this --DCB
*** Fix the node structure of Protocol-A.texi (3228867). *** Fix the node structure of Protocol-A.texi (3228867).
I will do this --DCB I will do this --DCB
Looks done...
*** Update/rewrite README. *** Update/rewrite README.
...@@ -62,8 +75,6 @@ Testfall f ...@@ -62,8 +75,6 @@ Testfall f
*** The protocol revision section of Protocol-A.info is incomplete. *** The protocol revision section of Protocol-A.info is incomplete.
I will do this --ceder I will do this --ceder
*** Document that session number 0 can be used in call 55.
** Build Issues ** Build Issues
*** Check that texinfo.tex is included in a proper place by automake. *** Check that texinfo.tex is included in a proper place by automake.
...@@ -76,6 +87,12 @@ Testfall f ...@@ -76,6 +87,12 @@ Testfall f
** Testing ** Testing
*** Try sending in negative lengths whenever we can send an array.
DONE for misc-info-list, add-aux delete-aux
*** Check that we don't leak memory when truncating a long
aux_item_list send from the client.
*** In prot_a_get_token, what is an insane token length? *** In prot_a_get_token, what is an insane token length?
*** Test validation of regexps containing groups. Try "X\\(YZ\\)?X". *** Test validation of regexps containing groups. Try "X\\(YZ\\)?X".
...@@ -87,13 +104,6 @@ Testfall f ...@@ -87,13 +104,6 @@ Testfall f
*** Should anyone be able to set their letterbox to secret? *** Should anyone be able to set their letterbox to secret?
*** There is no way to set the Personal_flags. It's not even obvious
where it gets its initial value! This is Not Good At All.
*** If we try to create a pers or conf and have reached the limit
of how many confs we can create, lyskomd just dies. Nasty. It
should return index-out-of-range, like create-text.
*** Timestamps of various things are not synchronized. *** Timestamps of various things are not synchronized.
This is seen easily when lyskomd executes really slowly. This is seen easily when lyskomd executes really slowly.
Known cases: last-written does not match text-stat (FIXED) Known cases: last-written does not match text-stat (FIXED)
...@@ -671,6 +681,59 @@ Testfall f ...@@ -671,6 +681,59 @@ Testfall f
removed. (1108039). removed. (1108039).
REJECT: too much work to be worth it. REJECT: too much work to be worth it.
*** Document "%%Unsupported protocol" message
DONE.
*** Document "%% No connections left" message
DONE.
*** Fix doc/lyskomdb.texi (Version 1) (see FIXME comments).
DONE.
*** Document that session number 0 can be used in call 55.
DONE.
*** There is no way to set the Personal_flags. It's not even obvious
where it gets its initial value! This is Not Good At All.
DONE.
*** If we try to create a pers or conf and have reached the limit
of how many confs we can create, lyskomd just dies. Nasty. It
should return index-out-of-range, like create-text.
DONE.
** When we pass a read-only misc item in create-text we get a protocol
error. We should get an illegal-misc. We can't just pass it through
since create_text_add_miscs will abort if it sees one of these misc
items.
DONE.
** Parsing arrays that are longer than the maximum length is not
handled very well. Right now we return a protocol error most of the
time, but perhaps it would be better to return a protocol error
only when the array is insanely long, not just when it is longer
than the max. So we could have a global max array length parameter.
DONE.
** Make sure that there are no "expected failures" in the test suite.
DONE.
** Try sending a too-long aux-item list
DONE.
** Send a too-long misc-item list
DONE.
** Sending a too-long delete or add list crashes the server.
DONE.
** Call add-recipient with really bogus info type
DONE.
*** Move dbck.texi, hacking.tex and lyskomdb.texi into lyskomd.texi.
Two reasons: there are too many manuals, and automake apparently
doesn't allow more than one file to include version.texi.
DONE.
* In progress * In progress
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
@c @c
@c FIXME: Explain how the garb works with nice and keep-commented @c FIXME: Explain how the garb works with nice and keep-commented
@c @c
@c $Id: Protocol-A.texi,v 1.63 1999/05/13 11:35:24 ceder Exp $ @c $Id: Protocol-A.texi,v 1.64 1999/05/18 13:06:18 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
...@@ -61,7 +61,7 @@ another language under the same conditions as for modified versions. ...@@ -61,7 +61,7 @@ another language under the same conditions as for modified versions.
@end titlepage @end titlepage
@ifinfo @ifinfo
@node Top @node Top, Overview, (dir), (dir)
@top LysKOM Protocol A @top LysKOM Protocol A
This document specifies version 10 of LysKOM Protocol A. This document specifies version 10 of LysKOM Protocol A.
...@@ -87,7 +87,7 @@ publication. ...@@ -87,7 +87,7 @@ publication.
@end menu @end menu
@end ifinfo @end ifinfo
@node Overview @node Overview, Introduction, Top, Top
@chapter Overview @chapter Overview
LysKOM is a conferencing system@footnote{Or in modern terms, enabling LysKOM is a conferencing system@footnote{Or in modern terms, enabling
...@@ -132,7 +132,7 @@ The LysKOM developers can be reached by email to @code{lyskom@@lysator.liu.se}. ...@@ -132,7 +132,7 @@ The LysKOM developers can be reached by email to @code{lyskom@@lysator.liu.se}.
* Notation:: * Notation::
@end menu @end menu
@node Document Revision History @node Document Revision History, Protocol Version History, Overview, Overview
@section Document Revision History @section Document Revision History
@table @asis @table @asis
...@@ -170,7 +170,7 @@ Per Cederqvist started using version control for documentation. ...@@ -170,7 +170,7 @@ Per Cederqvist started using version control for documentation.
Lars Aronsson documented the protocol that was in use at the time. Lars Aronsson documented the protocol that was in use at the time.
@end table @end table
@node Protocol Version History @node Protocol Version History, Notation, Document Revision History, Overview
@section Protocol Version History @section Protocol Version History
@subsection Protocol version 10 (first implemented in lyskomd 2.0.0) @subsection Protocol version 10 (first implemented in lyskomd 2.0.0)
...@@ -412,7 +412,7 @@ All calls from 0--56. ...@@ -412,7 +412,7 @@ All calls from 0--56.
@end table @end table
@node Notation @node Notation, , Protocol Version History, Overview
@section Notation @section Notation
This specification uses a BNF-like grammar to describe the protocol and This specification uses a BNF-like grammar to describe the protocol and
...@@ -435,7 +435,7 @@ literal strings. There is to be no whitespace before or after literal ...@@ -435,7 +435,7 @@ literal strings. There is to be no whitespace before or after literal
strings unless there is whitespace in the literal itself. strings unless there is whitespace in the literal itself.
@node Introduction @node Introduction, Data Types, Overview, Top
@chapter Introduction @chapter Introduction
This chapter introduces the concepts used in LysKOM, such as articles, This chapter introduces the concepts used in LysKOM, such as articles,
...@@ -452,7 +452,7 @@ conferences and sessions. ...@@ -452,7 +452,7 @@ conferences and sessions.
@end menu @end menu
@node Articles @node Articles, Conferences, Introduction, Introduction
@section Articles @section Articles
An article is represented as a value of the type @code{Text-Stat} and a An article is represented as a value of the type @code{Text-Stat} and a
...@@ -482,7 +482,7 @@ The server call @code{local-to-global} does this. ...@@ -482,7 +482,7 @@ The server call @code{local-to-global} does this.
@node Conferences @node Conferences, The Misc-Info List, Articles, Introduction
@section Conferences @section Conferences
Conferences hold articles. They are represented in the protocol as a Conferences hold articles. They are represented in the protocol as a
...@@ -535,7 +535,7 @@ changed to this type, preexisting secret members remain secret. ...@@ -535,7 +535,7 @@ changed to this type, preexisting secret members remain secret.
* Persons and Sessions:: * Persons and Sessions::
@end menu @end menu
@node Persons and Sessions @node Persons and Sessions, , Conferences, Conferences
@subsection Persons and Sessions @subsection Persons and Sessions
Persons are represented in the protocol by values of the type Persons are represented in the protocol by values of the type
...@@ -553,7 +553,7 @@ the network connection is closed; a user can log in and out repeatedly ...@@ -553,7 +553,7 @@ the network connection is closed; a user can log in and out repeatedly
in a single session. in a single session.
@node The Misc-Info List @node The Misc-Info List, The Aux-Item List, Conferences, Introduction
@section The Misc-Info List @section The Misc-Info List
The @code{Misc-Info} list contains tagged data. The fields are sent in The @code{Misc-Info} list contains tagged data. The fields are sent in
...@@ -702,7 +702,7 @@ article number which is a footnote to this article. ...@@ -702,7 +702,7 @@ article number which is a footnote to this article.
@end table @end table
@node The Aux-Item List @node The Aux-Item List, Security, The Misc-Info List, Introduction
@section The Aux-Item List @section The Aux-Item List
The aux-item list is used as a generic extension mechanism in the LysKOM The aux-item list is used as a generic extension mechanism in the LysKOM
...@@ -716,7 +716,7 @@ server and in protocol A. ...@@ -716,7 +716,7 @@ server and in protocol A.
* Defining New Aux-Item Types:: * Defining New Aux-Item Types::
@end menu @end menu
@node About Aux-Items @node About Aux-Items, Predefined Aux-Item Types, The Aux-Item List, The Aux-Item List
@subsection About Aux-Items @subsection About Aux-Items
Aux-items were introduced in protocol version 10 as a mechanism for Aux-items were introduced in protocol version 10 as a mechanism for
...@@ -748,7 +748,7 @@ no understanding of the contents can successfully parse the item anyway ...@@ -748,7 +748,7 @@ no understanding of the contents can successfully parse the item anyway
@node Predefined Aux-Item Types @node Predefined Aux-Item Types, Client-Specific Aux-Item Types, About Aux-Items, The Aux-Item List
@subsection Predefined Aux-Item Types @subsection Predefined Aux-Item Types
Predefined Aux-Item types are part of Protocol A, and clients should Predefined Aux-Item types are part of Protocol A, and clients should
...@@ -1065,7 +1065,7 @@ collection. ...@@ -1065,7 +1065,7 @@ collection.
@end table @end table
@node Client-Specific Aux-Item Types @node Client-Specific Aux-Item Types, Experimental Aux-Item Types, Predefined Aux-Item Types, The Aux-Item List
@subsection Client-Specific Aux-Item Types @subsection Client-Specific Aux-Item Types
Client-specific items do not cause the server to perform any magic. All Client-specific items do not cause the server to perform any magic. All
...@@ -1087,7 +1087,7 @@ If you want a range of numbers, send e-mail to the LysKOM development ...@@ -1087,7 +1087,7 @@ If you want a range of numbers, send e-mail to the LysKOM development
group. group.
@node Experimental Aux-Item Types @node Experimental Aux-Item Types, Defining New Aux-Item Types, Client-Specific Aux-Item Types, The Aux-Item List
@subsection Experimental Aux-Item Types @subsection Experimental Aux-Item Types
Experimental numbers are free for all. Use 'em any way you want. All Experimental numbers are free for all. Use 'em any way you want. All
...@@ -1095,7 +1095,7 @@ numbers in the range 20000-29999 are for experimental use. ...@@ -1095,7 +1095,7 @@ numbers in the range 20000-29999 are for experimental use.
@node Defining New Aux-Item Types @node Defining New Aux-Item Types, , Experimental Aux-Item Types, The Aux-Item List
@subsection Defining New Aux-Item Types @subsection Defining New Aux-Item Types
If you want a new predefined item type, just document what it does, what If you want a new predefined item type, just document what it does, what
...@@ -1121,7 +1121,7 @@ much less painful process than adding new calls. ...@@ -1121,7 +1121,7 @@ much less painful process than adding new calls.
@node Security @node Security, Membership and Reading, The Aux-Item List, Introduction
@section Security @section Security
Security in LysKOM is based on two components. Each person has a set of Security in LysKOM is based on two components. Each person has a set of
...@@ -1195,7 +1195,7 @@ Create persons ...@@ -1195,7 +1195,7 @@ Create persons
@end table @end table
@node Membership and Reading @node Membership and Reading, Client-Server Dialog, Security, Introduction
@section Membership and Reading @section Membership and Reading
Persons' memberships in conferences are represented in the protocol as Persons' memberships in conferences are represented in the protocol as
...@@ -1242,7 +1242,7 @@ global text numbers. If the server does not implement the ...@@ -1242,7 +1242,7 @@ global text numbers. If the server does not implement the
efficient but perfectly serviceable @pxref{get-map} call instead. efficient but perfectly serviceable @pxref{get-map} call instead.
@node Client-Server Dialog @node Client-Server Dialog, , Membership and Reading, Introduction
@section Client-Server Dialog @section Client-Server Dialog
The client-server dialog consists of two phases, establishing the connection The client-server dialog consists of two phases, establishing the connection
...@@ -1259,7 +1259,7 @@ the user connecting is followed by a newline character. ...@@ -1259,7 +1259,7 @@ the user connecting is followed by a newline character.
When the server has accepted the connection its reply is When the server has accepted the connection its reply is
protocol-dependent. Protocol A servers will reply with the string protocol-dependent. Protocol A servers will reply with the string
@code{LysKOM} on a single line. @code{LysKOM} on a single line if the connection attampt is successful.
@example @example
% telnet kom.lysator.liu.se 4894 % telnet kom.lysator.liu.se 4894
...@@ -1270,6 +1270,17 @@ protocol-dependent. Protocol A servers will reply with the string ...@@ -1270,6 +1270,17 @@ protocol-dependent. Protocol A servers will reply with the string
LysKOM LysKOM
@end example @end example