2002-08-11 Per Cederqvist Document "language" in the common area. (Bug 124). Fix grammar of common area. * doc/Protocol-A.texi (The User Area): The description of the common block grammar contained many errors. State that everything is encoded as HOLLERITHs, and that they in turn contain datatypes. Removed "list" and "elems"; added "string-list". Added the "language" setting. * doc/constructs.expected: Updated. * doc/checkargs.py (lexer.toplevel_copying): Ignore. (lexer.toplevel_quotation): Ignore (lexer.toplevel_insertcopying): Ignore. Make it possible to disable DNS lookups. Log DNS lookups that takes too long. (Bug 627). * src/server/server-config.c (parameters): Removed "Y2K Compatibility". Added "Use DNS" and "DNS log threshold". * doc/lyskomd.texi (Parameter Types): Document "double". (Parameters): New parameters: "Use DNS:" and "DNS log threshold:". * src/server/param.h (struct kom_par): Added use_dns and dns_log_threshold. Removed y2k_compat. * src/server/connections.c (get_host_name): New function. (login_request): Use get_host_name. (logout_request): Ditto. * src/server/conf-file.h, src/server/conf-file.c (assign_double): New function. 2002-08-10 Per Cederqvist Fix documentation of privilege bits create-conf and create-pers. (Bug 688). * doc/Protocol-A.texi (Security): create-conf and create-pers are normally not assigned. Added a footnote that says that they are normally not needed, either. * src/server/testsuite/lyskomd.0/27.exp: Removed references to bug 688. Check for ar. (Bug 523). * configure.in: Check for ar. Look in $PATH:/usr/ccs/bin, and stop with an error if no ar can be found. Avoid duplicating the license in Protocol-A.texi. (Bug 441). * doc/Protocol-A.texi: Use the new @copying and @insertcopying commands, to avoid repeating the copyright information. (About this document): New node, that makes the copyright information visible in Info and HTML. Fix the parser so that negative numbers are rejected. Don't pretend that the protocol base will ever be anything but ten. (Bug 225). * src/libraries/libmisc/s-string.h: (s_strtol): Removed the base argument. * src/libraries/libmisc/s-string.c (char2digit): Removed the base argument. Simplified the code. This should be faster now. (s_strtol): Removed the base argument. Don't allow leading '+' or '-' signs. This simplifies the code. * src/server/prot-a-parse.c (prot_a_parse_long): Removed the base argument of s_strtol. (prot_a_parse_string): Ditto. * src/server/aux-items.c (aux_item_trigger_mark_text): Removed the base argument of s_strtol. (aux_item_trigger_unmark_text): Ditto. (aux_item_trigger_mirror_faq): Ditto. (aux_item_validate_existing_text): Ditto. * src/include/kom-config.h (PROTOCOL_NUMBER_BASE): Removed. * src/server/testsuite/lyskomd.0/prot-a-parse-cov.exp: Updated, now that the parser no longer accepts negative numbers. * src/server/testsuite/lyskomd.0/bug-225.exp: Test bug 225. Fix references to dbck documentation. (Bug 386). * doc/lyskomd.texi (Parameters): Don't refer to dbck.info, since that document is now part of lyskomd.texi. (Administration): Ditto. Fix error codes for query-read-texts, query-read-texts-old and sub-member. (Bug 161, Bug 703, Bug 43 and Bug 612). * src/server/person.c: "kom-errno.h" must now be included before "manipulate.h". (do_query_read_texts): Fix error code computations. Previously, ENA(admin,4) was needed. Now, ENA(admin,2) or ENA(wheel,8) is enough. (Bug 161 & Bug 703). * src/server/membership.c (enum memb_visibility): Moved to manipulate.h. (membership_visible): No longer static. (sub_member): Improve error code computations. (Bug 612 & Bug 43). * src/server/manipulate.h (enum memb_visibility): Moved here from membership.c. (membership_visible): Now exported from membership.c. (set_conf_errno): New function. * src/server/conference.c: "kom-errno.h" must now be included before "manipulate.h". (set_conf_errno): New function. * src/server/admin.c: "kom-errno.h" must now be included before "manipulate.h". * src/server/aux-items.c: Ditto. * src/server/dbck.c: Ditto. * src/server/send-async.c: Ditto. * src/server/server-config.c: Ditto. * src/server/session.c: Ditto. * src/server/standalone.c: Ditto. * src/server/text.c: Ditto. * src/server/testsuite/lyskomd.0/27.exp: Bug 703 is fixed. * src/server/testsuite/lyskomd.0/bug-37-4.exp: Bug 703 is fixed. * src/server/testsuite/lyskomd.0/bug-612.exp: Test cases for bug 612. * doc/Protocol-A.texi (sub-member): Document the value of error-status for permission-denied errors. get-membership and get-membership-old didn't always honor unread-is-secret. (Bug 607). (Bug 608). * src/server/membership.c (copy_public_confs): New argument: pers_no. Caller updated. Use membership_visible to simplify code and fix bugs 607 and 607. * src/server/testsuite/lyskomd.0/bug-37-3.exp: Bug 607 and bug 608 are now fixed. * src/server/testsuite/lyskomd.0/bug-37-4.exp: Ditto. get-members and get-members-old leaks secret persons (Bug 705). * src/server/membership.c (membership_visible): New arguments: is_supervisor_of_member, is_supervisor_of_conf. Callers updated. Avoid calling access_perm if possible. Grant full access if ENA(admin,2) or ENA(wheel,8), as do_get_members did. (do_get_members): Use membership_visible to simplify code, and fix bug 705. * src/server/testsuite/lyskomd.0/bug-37.exp: Bug 705 fixed. Minor doc fix. * doc/Protocol-A.texi (Membership visibility): Markup fixed. * doc/constructs.expected: Updated. Fix membership visibility for get-unread-confs. (Bug 597). * src/server/membership.c (enum memb_visibility): New enum. (check_unread): New static function. (membership_visible): New static function, that fully implements the membership visibility rules that were documented 2002-08-07. (get_unread_confs): Use membership_visible to simplify the code and use the correct membership visibility rules. Various code cleanup. * src/server/testsuite/lyskomd.0/bug-37-2.exp: get-unread-confs is now better. Bug 597 fixed. * src/server/testsuite/lyskomd.0/bug-37.exp: get-unread-confs now fails in a different, and better, way for secret persons. * src/server/testsuite/lyskomd.0/27.exp: query-read-texts-old, query-read-texts and get-unread-confs should not censor the secret conference, since the viewer is supervisor of the member. 2002-08-08 Per Cederqvist Comment added. * src/server/membership.c (sub_member): Added comments for bug 612. Code cleanup: remove global define of SMALLOC_MAGIC_ALLOC and SMALLOC_MAGIC_FREE. (Bug 562). * src/server/ram-smalloc.c (SMALLOC_MAGIC_ALLOC): Moved here from smalloc.h. Only define if USE_MALLOC_GUARDS is true. (SMALLOC_MAGIC_FREE): Ditto. * src/include/server/smalloc.h (SMALLOC_MAGIC_ALLOC): Moved to ram-smalloc.c. (SMALLOC_MAGIC_FREE): Ditto. Test membership visibility in get-members-old and get-members. * src/server/testsuite/lyskomd.0/bug-37.exp: Test get-members-old and get-members. * src/server/testsuite/lyskomd.0/bug-37-2.exp: Ditto. * src/server/testsuite/lyskomd.0/bug-37-3.exp: Ditto. * src/server/testsuite/lyskomd.0/bug-37-4.exp: Ditto. 2002-08-07 Per Cederqvist Documented membership visibility. (Bug 693). * doc/Protocol-A.texi (Membership visibility): New chapter. * src/server/testsuite/lyskomd.0/bug-37-3.exp: Updated for new membership visibility rules. * src/server/testsuite/lyskomd.0/bug-37-4.exp: Ditto. 2002-08-06 Per Cederqvist Fix some "make maintainer-clean" lossage. * src/server/Makefile.am (aux-item-def-scan.o): Added an explicit dependency on aux-item-def-parse.h. * Makefile.am (DISTCLEANFILES): Added config.cache. 2002-08-02 Per Cederqvist More valgrind integration. * src/server/testsuite/config/unix.exp (check_valgrind): Remove boring valgrind logfiles. 2002-08-02 David Byers Add missing test cases for bug 84. * src/server/testsuite/config/prot-a.exp (kom_delete_text): New function. Use to delete a text from the test suite. * src/server/testsuite/lyskomd.0/bug-84.exp: Added missing test cases for bug 84 and one xfail for bug 690. 2002-08-02 Per Cederqvist Work around a race condition in the test suite. * src/server/testsuite/lyskomd.0/18.exp: Sleep six seconds to work around a race condition (Bug 692). Suppress errors from regex.c. Handle simultaneous runs of lyskomd and dbck. * src/server/testsuite/lyskomd.supp: New file for valgrind. This contains a suppression for bug 691. * src/server/testsuite/config/unix.exp (l2g_start): Pass a log file name to the valgrind wrapper. (dbck_run): Ditto. (spawn_lyskomd): New argument: log file name. All callers updated. Use the lyskomd.supp valgrind suppressions file. Pass --show-reachable=yes and a log file name to valgrind. (check_valgrind): New arguments: logfile, need_leaks and need_errs. All callers updated. * src/server/testsuite/Makefile.am (valgrind.wrap): Expect the log file name as the first argument. (EXTRA_DIST): Added lyskomd.supp. Make it possible to run lyskomd without malloc guard areas. * configure.in: Added --disable-malloc-guards. This is useful when combined with --with-valgrind, but should not be used in a production setting. * src/server/ram-smalloc.c: Document our guard areas, and make them optional. (OVERHEAD): New macro, that computes a size including the guard area overhead. Two versions, depending on if USE_MALLOC_GUARDS is defined or not. (smalloc): Reindent. Test USE_MALLOC_GUARDS. (sfree): Test USE_MALLOC_GUARDS. (srealloc): Test USE_MALLOC_GUARDS. Fixed a read past the end of a buffer. * src/libraries/libmisc/s-string.c (s_strtol): When a string containing only whitespace was passed to s_strtol, s_strtol would attempt to read the sign ('+' or '-') past the end of the string. Fix the l2g test cases. * src/server/testsuite/l2g.0/00.exp: Destroy all structures before exit, so that the leak check of valgrind works properly. * src/server/testsuite/l2g.0/01.exp: Ditto. * src/server/testsuite/l2g.0/02.exp: Ditto. * src/server/testsuite/l2g.0/03.exp: Ditto. * src/server/testsuite/l2g.0/04.exp: Ditto. * src/server/testsuite/l2g.0/05.exp: Ditto. * src/server/testsuite/l2g.0/06.exp: Ditto. * src/server/testsuite/l2g.0/07.exp: Ditto. * src/server/testsuite/l2g.0/08.exp: Ditto. * src/server/testsuite/l2g.0/09.exp: Ditto. * src/server/testsuite/l2g.0/10.exp: Ditto. Valgrind refinements. * src/server/testsuite/config/unix.exp (spawn_lyskomd): Use valgrind.wrap. (l2g_start): Use valgrind. (l2g_stop): Check valgrind output. (lyskomd_fail_start): Use valgrind. (check_valgrind): Ensure that the memory report is seen. (dbck_run): Use valgrind. * src/server/testsuite/Makefile.am (valgrind.wrap): New target. Since valgrind can only send the log to a specified file descriptor, and expect cannot open a specified file descriptor, we have to use a wrapper for valgrind. (noinst_DATA): Added valgrind.exp. (MOSTLYCLEANFILES): Added valgrind-*.log, valgrind.log and valgrind.wrap. (check-l2g): Depend on valgrind.wrap. (check-lyskomd): Ditto. (check-leaks): Ditto. Plug a memory leak. * src/server/aux-items.c (aux_item_definition_cache_regexp): Call regfree() when a regex compilation fail, since our re_compile_pattern may leave allocated stuff in the buffer. Improved valgrind support. * configure.in: Remove all remnants of the purify support, since it was broken when we switched to automake. Added valgrind support. * src/server/testsuite/.cvsignore: Ignore valgrind-*.log. * src/server/testsuite/Makefile.am (site.exp): Set valgrind. * src/server/testsuite/config/unix.exp: Use the "valgrind" variable from site.exp. It contains a the path name of the valgrind binary to use. (spawn_lyskomd): Adjust accordingly. Don't use -v. (check_valgrind): New argument: expected_leaks. (lyskomd_death): Pass the new optional argument "expected_leaks" to check_valgrind. Note a memory leak. * src/server/testsuite/lyskomd.0/regexp-match-cov.exp: Bug 689 is a hard-to-fix memory leak. Mark it as an expected failure. (shutdown): Pass info about expected leaks to lyskomd_death. * src/server/testsuite/lyskomd.0/aux-items-cov.exp: This triggers a hard-to-fix memory leak (Bug 689). Shut up valgrind. * src/server/memory.c (init_person): Clear the pwd field. This way, we avoid writing junk to the database file, and we make valgrind happy. The junk was never used, so this is not a bugfix. Test suite fix. * src/server/testsuite/lyskomd.0/27.exp: Use idholl where appropriate. Fix a minor memory leak. * src/server/aux-items.c (free_aux_item_definitions): Fixed a memory leak. We have to call regfree() to deallocate stuff within the compiled regular expression. This bug was found with valgrind. Added some valgrind support. (Bug 514). * src/server/testsuite/config/unix.exp: Handle the VALGRIND command line argument. (spawn_lyskomd): New proc, that knows how to use valgrind. (lyskomd_fail_start): Use spawn_lyskomd. (parse_valgrind_leak): New proc. (check_valgrind): New proc. (lyskomd_death): Call check_valgrind. 2002-08-01 Per Cederqvist Minor doc fix. * doc/Protocol-A.texi (Preface): Fix markup. * doc/constructs.expected: Updated. 2002-07-31 Per Cederqvist Updated send-comments-to [33] so that it now allows an optional recipient type. * run-support/aux-items.conf: Updated send-comments-to [33]. * doc/Protocol-A.texi (Aux-Item Types): Ditto. * src/server/testsuite/lyskomd.0/23.exp: Refer to 28.exp. * src/server/testsuite/lyskomd.0/28.exp: Test the aux-item send-comments-to (33) with a specified recipient type. More membership visibility tests. * src/server/testsuite/lyskomd.0/27.exp: Test basic visibility of a secret conference for the supervisor of a member. Version 2.0.6 of lyskomd passes the test as written. 2002-07-22 Per Cederqvist Fix typo in Protocol A example. * doc/Protocol-A.texi (re-z-lookup): Fixed ref-id error in example. Thanks to Joorin for pointing it out. (Preface): Mention that bugs should be reported via Bugzilla. 2002-06-22 Per Cederqvist New membership-related tests. * doc/Protocol-A.texi (Person Status Types): Explicitly say that the supervisor of a person bypasses the unread-is-secret bit. * src/server/testsuite/lyskomd.0/bug-37-4.exp: New test cases. Like bug-37.exp, but let the observer be supervisor of all conferences, and let all memberships be secret. * src/server/testsuite/lyskomd.0/bug-37-3.exp: New test cases. Like bug-37.exp, but let the observer be supervisor of all conferences. * src/server/testsuite/lyskomd.0/bug-37-2.exp: Don't set the flg3 flag of the Personal-Flags. Removed a comment. * src/server/conference.c (set_conf_type): David Byers is no longer a supporter of secret persons, so remove a comment that states that he is. 2002-06-15 Per Cederqvist get_unread_confs no longer censors rd-prot conferences. (Bug 596). * src/server/membership.c (get_unread_confs): It is sufficient that the viewer has read_protected access to a conference for it to be returned. * src/server/testsuite/lyskomd.0/bug-37.exp: Bug 596 is fixed. This also causes two other tests to fail in a different way. * src/server/testsuite/lyskomd.0/bug-37-2.exp: Adjusted to the resolution of bug 596. This only affects how certain tests fails. Don't lose the array size of get-membership and get-membership-old. (Bug 598). * src/server/membership.c (copy_public_confs): Removed the "copy_secret" argument. Simplify the code, and don't lose the array size just because want_read is false. * src/server/testsuite/lyskomd.0/bug-598.exp (want_array_size): Don't expect failure. Added test cases for bug 598: get-membership and get-membership-old sometimes drops the array size. * src/server/testsuite/lyskomd.0/bug-598.exp: New file. Test bug 598. * src/server/testsuite/lyskomd.0/bug-598-2.exp: A version of the bug-598.exp test with unread-is-secret set. Fixed minor doc error. * doc/Protocol-A.texi (get-membership-old): Fixed error in description of index-out-of-range. (get-membership): Ditto. * doc/constructs.expected: Updated. Introduce good_bad_expect, for trapping XFAIL situations nicely. * src/server/testsuite/config/unix.exp (good_bad_expect): New proc. * src/server/testsuite/renumber.el (renumber-lyskom-send-simple-expect): Handle good_bad_expect. Write a test cases for bug 37. * src/server/testsuite/lyskomd.0/bug-37.exp: New test case for bug 37. Bugs 593, 594, 595 and 596 were found while writing this test case... * src/server/testsuite/lyskomd.0/bug-37-2.exp: Like bug-37.exp, but with all memberships being secret. Found bug 597. Document unread-is-secret. (Bug 593). * doc/Protocol-A.texi (Person Status Types): Added a reference to Security, for an explanation of the privileges. Document the bits in Personal-Flags. (Membership Information): Document how unread-is-secret affects some parts of Membership and Membership-Old. Added a test case for bug 349. * src/server/testsuite/lyskomd.0/bug-349.exp: Test case for bug 349: wrong error code from set_supervisor. 2002-06-14 Per Cederqvist Document the Message-ID format of exported texts. (Bug 574). * doc/Protocol-A.texi (Importing and Exporting E-Mail): Document the Message-ID format of exported texts. Remove autoconf-2.53 warning. * configure.in: Use all three arguments of AC_DEFINE. * acinclude.m4 (CMOD_C_ATTRIBUTE_UNUSED): Use all three arguments of AC_DEFINE. * acconfig.h: File removed. 2002-05-20 Per Cederqvist Minor doc fix. * doc/Protocol-A.texi (Client-Server Dialog): Don't mention feature-disabled twice. 2002-05-07 David Byers * Updated message from 2002-04-11. 2002-04-14 David Byers * doc/Protocol-A.texi (Aux-Item Types): Documented elisp-client-read-faq and elisp-client-rejected-recommendation. 2002-04-13 David Byers Test for fix of bug 145: * src/server/testsuite/config/prot-a.exp (kom_delete_conf): New function. (kom_lookup_z_name): New function. 2002-04-12 David Byers Fix bug 145: * src/server/conference.c (do_delete_conf): Removed lines that cleared the name of the conference. That is done in cached_delete_conf. Fix bug 38: * src/server/testsuite/lyskomd.0/bug-38.exp: New file. * src/server/testsuite/config/prot-a.exp (kom_set_user_area): New function. (kom_shutdown_server): New function. (kom_create_text_simple): New function. (cres): The else branch which does eval actually works now. Made ref_no global in this function. * src/server/person.c (do_set_user_area): Copied check for read access to new user area from get_text_stat. Fix bug 331: * src/server/testsuite/lyskomd.0/03.exp: Use idholl and lyskomd_host for hostname-dependend strings. * src/server/testsuite/lyskomd.0/16.exp: Use idholl and lyskomd_host for hostname-dependend strings. * src/server/testsuite/lyskomd.0/01.exp: Use idholl and lyskomd_host for hostname-dependend strings. * src/server/testsuite/lyskomd.0/00.exp: Use idholl and lyskomd_host for hostname-dependend strings. * src/server/testsuite/config/unix.exp (idholl): New function to create hollerith with at sign and name of localhost appended. (lyskomd_server): New variable containing the name of this host. 2002-04-11 David Byers * src/server/aux-items.c (aux_item_trigger_mirror_faq): Don't just return when the object type is INFO_OBJECT_TYPE (which represents server aux-items). Instead, create the mirror aux-item as required by the protocol. * configure.in: Added AC_PREREQ. 2002-04-07 Per Cederqvist Added the world-readable aux item. (Bug 5). * run-support/aux-items.conf: Added world-readable [34]. * src/server/text.c (person_text_read_access): Give everybody read access to texts with a world-readable aux-item. * doc/Protocol-A.texi (Aux-Item Types): New aux-item: world-readable. (get-text): Mention the world-readable aux item under the no-such-text error code. (get-text-stat-old): Ditto. (get-text-stat): Ditto. * src/server/testsuite/lyskomd.0/01.exp: Handle world-readable. * src/server/testsuite/lyskomd.0/03.exp: Ditto. * src/server/testsuite/lyskomd.0/18.exp: Ditto * src/server/testsuite/lyskomd.0/26.exp: Test world-readable. 2002-04-06 Per Cederqvist Use symbolic names for aux item tags. * src/server/aux-items.c (aux_item_trigger_mirror_faq): Use aux_faq_for_conf from aux.h instead of a hardcoded 28. * src/server/Makefile.am (aux.h): New target. (MOSTLYCLEANFILES): Added aux.h. (NODIST_GENOBJS): Added aux.h. (BUILT_SOURCES): Added aux.h. (version.incl): Fixed spelling error. (version-info.c): Ditto. 2002-04-02 Per Cederqvist Fix the documentation of no-of-created-texts (Bug 384). * doc/Protocol-A.texi (Person Status Types): Fix the documentation of no-of-created-texts. (Bug 384). Clarify the description of get-person-stat-old. * doc/Protocol-A.texi (get-person-stat-old): Don't call the "username" field "name". Add markup for it. Clarify that the empty string is returned; dont say that the "name is not returned". Automake improves. * src/server/testsuite/Makefile.am (noinst_DATA): Removed a comment about an Automake deficiency that is no longer there. (Bug 208). 2002-03-29 Per Cederqvist * Release 2.0.6. Release administrativa. * doc/checkargs.py: Copyright header added. * scripts/lyskomd-copyrights: Updated. * HACKING: Updated version numbers. Mention Bugzilla. * configure.in: Set version 2.0.6. * versions (SERVER-VERSION): 2.0.6. (SERVER-COMPAT-VERSION): 20006. * README: Updated for the 2.0.6 release. * NEWS: Updated for the 2.0.6 release. * doc/Protocol-A.texi (PROTOEDITION): Set to 10.6. (VERSION): Set to 2.0.6. (Document Edition History): Document changes in edition 10.6. * doc/constructs.expected: Updated. Create PDF and DVI output from the protocol specification. * doc/Makefile.am (pdf): New target. (html): New target. (Protocol-A.dvi): New target. (Protocol-A.pdf): Use texi2dvi --pdf instead of texi2pdf. (protocol-a.texi): New target. Major hack. Expand a few of the macros so that texinfo.tex can cope with the rest. (protocol-a/index.html): New target. (.texi.notab): Use automake comments instead of /bin/sh comments. (update-www): Also depend on protocol-a/index.html, Protocol-A.dvi and Protocol-A.pdf, and install them. (check): Also depend on the targets pdf and dvi. Doc fixes. * doc/Protocol-A.texi (create-person-old): Moved a misplaced brace to its proper place. (get-text): State that ^J represents a newline in the example. (create-person-old): Move punctuation outside of quotes, according to the Texinfo style guide. 2002-03-26 Per Cederqvist Port to Cygwin. * src/server/Makefile.am (all-recursive): Added the $(EXEEXT) suffix to lyskomd and dbck, so that the makefile works on cygwin. (check-recursive): Ditto. 2002-03-24 Per Cederqvist Allow faq-text to be set on letterboxes. (Bug 423). * run-support/aux-items.conf (faq-text): Allow it on letterboxes as well as conferences and the server. * doc/Protocol-A.texi (Aux-Item Types): Document that faq-text may be set on letterboxes. * src/server/testsuite/lyskomd.0/03.exp: Set an faq-text on the letterbox of person 8. 2002-02-15 Per Cederqvist Added support for the "Jubel: public" parameter, that enforces the policy that certain texts must be created in public conferences. * src/server/testsuite/lyskomd.0/25.exp: Test public jubels. * src/server/text.c (create_text_check_misc): New argument: need_public_jubel. (struct jubel): New field: public. (register_jubel): New argument: public. (ok_to_create_next_text): New result parameter: must_be_public. (do_create_text): Check for jubels that must be public. * src/server/standalone.c (register_jubel): New argument: public. * src/server/server-config.c (jubel): Handle the new "public" form. * src/server/manipulate.h (register_jubel): New argument: public. * doc/lyskomd.texi (Parameter Types): These are standard types, not all legal types. (Parameters): Document the "public" forms of the Jubel parameters. Mention that there may be several Jubel parameters. 2002-02-11 Per Cederqvist Don't emit garbage statistics. (Bug 390). * src/server/connections.c (dump_statistics): Don't emit statistics for the dummy request used to skip unimplemented requests. Initialize the function_index field a little earlier. * src/server/prot-a.c (prot_a_init): Initialize function_index. * src/server/internal-connections.c (init_connection): Initialize function_index. Make fnc-def-init.incl look nicer. (Bug 381). * src/server/fnc-def-init.awk: Make certain that the final entry, that is only used to skip all arguments of requests that are not implemented, gets a unique number. 2002-02-10 Per Cederqvist Bugzilla affects the release procedures. * HACKING: Mention that the version number should be added to Bugzilla when releases are made. 2002-01-23 Per Cederqvist Added missing include statement. (Bug 385). * src/server/log.c: Include stdlib.h. 2002-01-18 Per Cederqvist Quote backslashes properly in Texinfo macro calls. (Bug 376). * doc/Protocol-A.texi (create-text-old): Properly quote \n in macro call. (create-anonymous-text-old): Ditto. 2002-01-03 Per Cederqvist Document that ``last-login'' is also updated on logout. * doc/Protocol-A.texi (Person Status Types): Don't forget to mention that ``last-login'' is also updated on logout. 2002-01-01 Per Cederqvist Check @field{} usage. (Bug 206). * doc/checkargs.py (defined_fields): New variable. (undefined_fields): New variable. (prot_a_struct.add_field): Handle defined_fields and undefined_fields. (prot_a_bitstring.add_field): Ditto. (lexer.toplevel_bye): Check for undefined fields. (lexer.toplevel_field): New method. * doc/Makefile.am (check): Removed a fixed FIXME comment. * doc/Protocol-A.texi (Future changes): Don't use @field{} when talking about stuff that might be a field some day in the future. Check @priv{} usage, and that all implemented Priv-Bits are documented, and vice versa. (Bug 207). * doc/Makefile.am (check): Create privbits.tmp. Check @priv{} usage. * doc/checkargs.py (lexer.__init__): Load "privbits.tmp". (lexer.toplevel_bye): Check Priv-Bits. Document the ``change-name'' capability. * doc/Protocol-A.texi (Security): Document ``change-name''. Remove the unused and undocumented privilege bit ``extern_gw''. * src/include/kom-types.h (Priv_bits): Renamed the unused bit ``extern_gw'' to ``flg7'', and reserve it for future use. * src/server/ram-parse.c (fparse_priv_bits): Parse flg7 instead of extern_gw. * src/server/ram-output.c (foutput_priv_bits): Emit flg7 instead of extern_gw. * src/server/prot-a-parse.c (prot_a_parse_priv_bits): Parse flg7 instead of extern_gw. * src/server/prot-a-output.c (prot_a_output_priv_bits): Emit flg7 instead of extern_gw. * src/server/memory.c (init_priv_bits): Initialize flg7 instead of extern_gw. * src/server/dbck.c (check_persons): Set Priv_bits flg7 instead of extern_gw. 2001-12-31 Per Cederqvist Fix documentation of error code ``client-is-crazy''. * doc/Protocol-A.texi (Error Codes): client-is-crazy is actually used, so don't say it isn't. Check @errorcode usage. * doc/Makefile.am (check): Create files for all error codes that are implemented. Check @errorcode{} usage. (Bug 205). Check that all implemented Conf_type bits are documented, and vice versa. * doc/Makefile.am (check): Don't ignore the reserved bits of Conf_type. * doc/checkargs.py (prot_a_bitstring.__init__): New method. (prot_a_bitstring.add_field): Store the field, and check for duplicates. (prot_a_bitstring.check_implemented): New method. (lexer.__init__): Read conftypes.tmp. (lexer.toplevel_bye): Check Extended-Conf-Type. (lexer.__parse_userdefined_bitstring): Be prepared that prot_a_bitstring.add_field can return an error message. Check that all implemented misc-infos are documented, and vice versa. * doc/Makefile.am (check): Create miscs-numbered.tmp based on the contents of kom-types.h. * doc/checkargs.py (prot_a_selection.check_implemented): New method. (prot_a_selection.all_names): New method. (lexer.__init__): Check that the same number isn't used twice in asyncs-numbered.tmp. Read miscs-numbered.tmp. (lexer.toplevel_bye): Check that all implemented misc-infos are documented, and vice versa. 2001-12-30 Per Cederqvist Code cleanup. (Bug 346). * src/server/aux-items.c (aux_item_default_definition): Removed left-over traces of "extended aux-items", a concept that didn't scale and was abandoned a long time ago. Document supervisors better. * doc/Protocol-A.texi (Conferences): State that a person is a supervisor of himself, except for the set-supervisor call. Fix "make check". * doc/constructs.expected: Updated. * doc/checkargs.py (lexer.pushback): Pushback @cindex. Code cleanup. * src/server/aux-items.c (conf_stat_check_add_aux_item_list): Removed confusing comment. 2001-12-29 Per Cederqvist Code cleanup. * src/server/aux-items.h, src/server/aux-items.c (prepare_aux_item): Now a static function. (filter_aux_item_list): Comment updated. Fixed typos. * doc/Protocol-A.texi (Reformattable Text (text/x-kom-basic)): Removed duplicated "as". * src/server/aux-items.c: Fixed typo in comment. 2001-12-28 Per Cederqvist Talk about character sets. (Bug 339). * doc/Protocol-A.texi (Simple Data Types): Talk a little about character sets under HOLLERITH, without saying anything definite. Check for __attribute__((__noreturn__)) support at configuration time instead of at compile time. (Bug 57). * src/include/compiler.h: Removed. * src/include/Makefile.am (noinst_HEADERS): Removed compiler.h. * configure.in: Check for __attribute__((__noreturn__)). * acconfig.h (HAVE_ATTRIBUTE_NORETURN): Added. * src/server/lyskomd.h: Don't include compiler.h. Use HAVE_ATTRIBUTE_NORETURN instead of the NORETURN symbol, that previously was defined by compiler.h. Don't include config.h twice. * src/libraries/libcommon/kom-errno.c: Don't include both and "config.h". Don't declare kom_errno and err_stat twice. (Bug 343). * src/server/ramkomd.c (kom_errno): Removed, since this is already defined in src/libraries/libcommon/kom-errno.c. (err_stat): Ditto. Use ``union result_holder'' instead of ``Result_holder''. (Bug 337). * src/server/connections.h (union result_holder): Result_holder typedef removed. * src/server/connections.c: Use ``union result_holder'' instead of ``Result_holder''. * src/server/prot-a.h: Ditto. * src/server/prot-a.c: Ditto. * doc/lyskomd.texi (Adding New Result Types): Use ``union result_holder'' instead of ``Result_holder''. (Modifying Output Types): Ditto. Use ``union info_datum instead of ``Info_datum''. (Bug 337). * src/server/manipulate.h (ADD_MISC): Use ``union info_datum instead of ``Info_datum''. * src/include/kom-types.h (union info_datum): Removed Info_datum typedef. Use ``enum kom_err'' instead of ``Kom_err''. (Bug 335). * src/libraries/libcommon/kom-errno.c: Use ``enum kom_err'' instead of ``Kom_err''. * src/server/aux-items.c: Ditto. * src/server/ramkomd.c: Ditto. * src/include/kom-errno.h (enum kom_err): Removed Kom_err typedef. Use ``enum res_type'' instead of ``Res_type''. (Bug 335). * src/server/connections.h (enum res_type): Removed the Res_type typedef. The only user updated. * doc/lyskomd.texi (Adding New Result Types): Use ``enum res_type'' instead of ``Res_type''. (Modifying Output Types): Ditto. Use ``enum log_class'' instead of ``Log_class''. (Bug 335). * src/server/logII.c (enum log_class): Removed the Log_class enum. (log): Use ``enum log_class'' instead of ``Log_class''. Use ``enum log_type'' instead of ``Log_type''. (Bug 335). * src/server/simple-cache.c (enum log_type): Removed the Log_type typedef. (log_access): Use ``enum log_type'' instead of ``Log_type''. Use ``enum aux_item_validation_type'' instead of ``Aux_Item_Validation_Type''. (Bug 335). * src/server/aux-items.h (enum aux_item_validation_type): Removed the Aux_item_validation_type typedef. The only user updated. Use ``enum call_header'' instead of ``Call_header''. (Bug 335). * src/server/connections.h: Use ``enum call_header'' instead of ``Call_header''. * src/server/prot-a.c: Ditto. * src/server/com-h.awk: Don't create the Call_header typedef. Use ``enum access'' instead of ``Access''. (Bug 335). * src/server/manipulate.h: Use ``enum access'' instead of ``Access''. (enum access): Removed ``Access'' typedef. * src/server/conference.c: Use ``enum access'' instead of ``Access''. * src/server/membership.c: Ditto. * src/server/person.c: Ditto. * src/server/text.c: Ditto. Updated a comment. * src/server/session.c (accept_async): Updated a comment that talked about ``Async'' instead of ``enum async''. Use ``enum object_type instead of ``Object_type''. (Bug 335). * src/include/kom-types.h (enum object_type): Removed Object_type typedef. All types that contain an enum object_type updated. * src/server/aux-items.c: Use ``enum object_type'' instead of ``Object_type''. * src/server/aux-items.h: Ditto. * src/server/ram-parse.c: Ditto. Use ``enum info_type instead of ``Info_type''. (Bug 335). * src/include/kom-types.h (enum info_type): Removed Info_type typedef. All types that contain an enum info_type updated. * doc/Makefile.am (check-doc): Extract ``enum info_type'' instead of ``Info_type'' from kom-types.h. * src/server/text.c (do_add_recipient): Use ``enum info_type'' instead of ``Info_type''. (send_async_sub_recipient): Ditto. (remove_misc_item): Ditto. (create_text_add_miscs): Ditto. (send_async_add_recipient): Ditto. (add_recipient): Ditto. * src/server/send-async.h, src/server/send-async.c (async_new_recipient): Use ``enum info_type'' instead of ``Info_type''. (async_sub_recipient): Ditto. * src/server/ram-parse.c (fparse_misc_info): Use ``enum info_type'' instead of ``Info_type''. * src/server/prot-a-send-async.h, src/server/prot-a-send-async.c (prot_a_async_new_recipient): Use ``enum info_type'' instead of ``Info_type''. (prot_a_async_sub_recipient): Ditto. * src/server/memory.c (clear_text_stat): Use ``enum info_type'' instead of ``Info_type''. * src/server/manipulate.h (ADD_MISC): Use ``enum info_type'' instead of ``Info_type''. * src/include/services.h (add_recipient): Use ``enum info_type'' instead of ``Info_type''. Code cleanup. * src/server/conference.c: Removed an obsolete comment. 2001-12-28 Per Cederqvist Fixed the specification of idle-time. (Bug 197). * doc/Protocol-A.texi (Session Information): The idle-time is affected only by the user-active request, not by any request. Use "C" environment when sorting test output (Bug 330). * doc/Makefile.am (check-doc): Set LANG, LC_ALL, LC_COLLATE and LC_CTYPE to "C" when running sort and uniq. BUG and BUGS comments converted into FIXMEs and entered into Bugzilla. (Bug 336). * src/server/membership.c (sub_member): Obsolete BUGS comment removed. * src/server/ram-parse.c: BUGS comment converted into FIXMEs and entered into Bugzilla. * src/server/prot-a-parse.c: BUG comment converted into FIXME and entered into Bugzilla. * src/server/conference.c: BUG and BUGS comments converted into FIXMEs and entered into Bugzilla. 2001-12-22 Per Cederqvist Use ``enum async'' instead of ``Async''. (Bug 335). * src/server/session.c (accept_async): Use ``enum async'' instead of ``Async''. * src/server/prot-a-send-async.c (async_header): Use ``enum async'' instead of ``Async''. * src/server/internal-connections.c (init_connection): Use ``enum async'' instead of ``Async''. * src/server/async.h (enum async): Removed the Async typedef. * doc/lyskomd.texi (Adding Asynchronous Messages): Use ``enum async'' instead of a typedef. The check for supervisor in modify_conf_info was broken. (Bug 309). * src/server/conference.c (modify_conf_info): Fix typo: use conf->supervisor instead of conf->super_conf. * src/server/testsuite/lyskomd.0/24.exp: Check for bug 309. Bug 334 was found while writing this test case; setup_xfail for it. Fix typo in documentation. * doc/Protocol-A.texi (modify-conf-info): Fixed typo: changed "text" to "conference". Be clearer about the default prefix. (Bug 306). * doc/lyskomd.texi (Parameter Types): Be clearer about the fact that ``Prefix:'' overrides the compile-time default. (Parameters): Ditto. Added a footnote for the first path that reiterates this fact. (DBCK Files): Added a missing colon. Document super-conf better, and simplify the rules slightly. Document permitted-submitters slighlty more. (Bug 310). * doc/Protocol-A.texi (Conferences): Added a reference to ``Recipients of comments'' under the explanation of rd-prot. (Conference Status Types): Document super-conf properly. It has two different uses. (set-permitted-submitters): Document what it means when ``permitted-submitters'' is zero, and that that setting is the default. (set-super-conf): Added a reference to ``Conference Status Types''. (The User Area): Spelling error fixed. (Recipients of comments): Simplified the rules for super-conf. A setting of 0 no longer means anything. The previous meaning wasn't implemented. 2001-12-13 Per Cederqvist Added new aux-item send-comments-to. (Bug 308). * run-support/aux-items.conf: Added send-comments-to [33]. * src/server/testsuite/lyskomd.0/01.exp: Handle send-comments-to. * src/server/testsuite/lyskomd.0/03.exp: Ditto. * src/server/testsuite/lyskomd.0/18.exp: Ditto. * src/server/testsuite/lyskomd.0/23.exp: Test suite implemented. Robustify test suite. * src/server/testsuite/config/unix.exp (extracting_expect): Set $var to the empty string even on failure, to avoid some TCL errors. 2001-12-12 Per Cederqvist Code cleanup. * src/server/testsuite/lyskomd.0/prot-a-parse-cov.exp: Removed trailing blank lines. Work on test case for new aux-item send-comments-to. * src/server/testsuite/lyskomd.0/23.exp: Check the aux-item send-comments-to (33). This is an early commit of work in process. 2001-11-25 Per Cederqvist Documentation fixes. * doc/Protocol-A.texi (Recipients of comments): Errata from Hans Persson and Per Starbäck. 2001-11-22 Per Cederqvist Documentation clarifications. * doc/Protocol-A.texi (Aux-Item Types): Clarify that the address part of redirect is a conference number, not a name. Clarify the text for send-comments-to. 2001-11-21 Per Cederqvist Add documentation for aux-item send-comments-to. * doc/Protocol-A.texi (Article Information): Mention bcc-recpt in a few places where only recpt and cc-recpt was mentioned. (Aux-Item Types): Document send-comments-to. (Bug 308). (Recipients of comments): New subsection. 2001-11-20 Per Cederqvist Document splitkomdb. Fix its usage message. (Bug 21). * doc/lyskomd.texi (Parameters): Document "Backup export directory:". (splitkomdb): New chapter. * src/server/splitkomdb.c (usage): Added the "-f" option to the usage message. 2001-11-18 Per Cederqvist Replace internal-services.h with text.h. Make sure all text in the file is in English. (Bug 150.) * src/server/Makefile.am (lyskomd_SOURCES): Removed internal-services.h. Added text.h. * src/server/text.h: New file, containing the prototype for do_delete_text(), that was moved from internal-services.h. * src/server/text-garb.c: Include text.h instead of internal-services.h. * src/server/text.c: Ditto. * src/server/ramkomd.c: Don't include internal-services.h. It isn't used. * src/server/internal-services.h: File removed. 2001-11-17 Per Cederqvist Added markup for content types. (Bug 230). * doc/Protocol-A.texi (LysKOM Content Types): Added markup for content types. (Reformattable Text (text/x-kom-basic)): Ditto. (Content type specification): Ditto. (Document Edition History): Ditto. * doc/constructs.expected: Updated. Document that the elisp-client has used the wrong content type. * doc/Protocol-A.texi (Reformattable Text (text/x-kom-basic)): Mention that the elisp client used to enter texts as "x-kom/text" instead of "text/x-kom-basic". 2001-11-16 Per Cederqvist More Bugzilla references added. * src/server/testsuite/lyskomd.0/prot-a-parse-cov.exp: Added Bugzilla reference to a FIXME-style comment that wasn't marked. 2001-11-15 Per Cederqvist Code cleanup. (Bug 166). * src/server/session.c (accept_async): Removed redundant code. * src/server/testsuite/lyskomd.0/03.exp: Comments added. 2001-11-13 Per Cederqvist Change the name of the administrator in the English database. Try to load that database from the test suite. * db-crypt/db/lyskomd-data-en: Change "Administrator (for) LysKOM" into "Administrator (of) LysKOM". (Bug 13). * src/server/testsuite/lyskomd.0/22.exp: Test that the English database is loadable. * src/server/testsuite/config/unix.exp (lyskomd_start): New optional argument: db_suffix. Test suite cleanup. * src/server/testsuite/leaks.0/leaks99.exp: Remove redundant tests. The tests in lyskomd.0 automatically check for memory leaks, so there is no need to rerun those the tests here. (Bug 219). * src/server/testsuite/leaks.0/leaks00.exp: Remove obsolete comments. (Bug 218). Fixed bogus examples in Protocol-A.texi. * doc/Protocol-A.texi (query-read-texts): Fixed the example. It was missing both the "position" and "added-at" fields. (Bug 198, reported by Kent.) (get-membership): Ditto. (Bug 223). * doc/constructs.expected: Updated. 2001-11-11 Per Cederqvist Remove some uses of rcs.h that was overlooked 2001-11-04. (Bug 140). * src/libraries/libansi/memchr.c: Don't include rcs.h. Remove rcsid variable. * src/libraries/libansi/memcmp.c: Ditto. * src/libraries/libansi/memcpy.c: Ditto. * src/libraries/libansi/memset.c: Ditto. * src/libraries/libansi/remove.c: Ditto. * src/libraries/libansi/strerror.c: Ditto. * src/libraries/libmisc/numlist.c: Ditto. * src/libraries/libmisc/numlist2.c: Ditto. * src/libraries/libmisc/testnumlist.c: Ditto. Several files didn't include . (Bug 191). * src/libraries/libansi/empty.c: Include if HAVE_CONFIG_H is defined. * src/libraries/libansi/memchr.c: Ditto. * src/libraries/libansi/memcmp.c: Ditto. * src/libraries/libansi/memcpy.c: Ditto. * src/libraries/libansi/memset.c: Ditto. * src/libraries/libansi/remove.c: Ditto. * src/libraries/libansi/setsid.c: Ditto. * src/libraries/libansi/strdup.c: Ditto. * src/libraries/libansi/strerror.c: Ditto. * src/libraries/libcommon/kom-errno.c: Ditto. * src/libraries/libcommon/misc-parser.c: Ditto. * src/libraries/libcommon/parser.c: Ditto. * src/libraries/libmisc/ldifftime.c: Ditto. * src/libraries/libmisc/numlist.c: Ditto. * src/libraries/libmisc/numlist2.c: Ditto. * src/libraries/libmisc/s-collat-tabs.c: Ditto. * src/libraries/libmisc/s-string.c: Ditto. * src/libraries/libmisc/testnumlist.c: Ditto. * src/server/Makefile.am (version-info.c): Ditto. More Bugzilla references added. * src/server/testsuite/lyskomd.0/03.exp: Removed obsolete FIXME comments. * src/server/testsuite/lyskomd.0/06.exp: Ditto. * configure.in: Added references to Bugzilla for all FIXME comments. * src/server/testsuite/l2g.0/09.exp: Ditto. * src/server/testsuite/leaks.0/leaks00.exp: Ditto. * src/server/testsuite/lyskomd.0/aux-items-cov.exp: Ditto. * src/server/testsuite/lyskomd.0/prot-a-parse-cov.exp: Ditto. Don't build libcheck.a unless we are running the test suite. * src/server/Makefile.am (check_LIBRARIES): This target was formerly named noinst_LIBRARIES, but there is no reason to build the libcheck.a library unless we are running the checks. (all-recursive): Don't depend on libcheck.a. 2001-11-10 Per Cederqvist More Bugzilla references added. * src/server/testsuite/Makefile.am: Added references to Bugzilla for all FIXME comments. 2001-11-09 Per Cederqvist More Bugzilla references added. * doc/Makefile.am: Added references to Bugzilla for all FIXME comments. 2001-11-08 Per Cederqvist More Bugzilla references added. * doc/Protocol-A.texi: Added references to Bugzilla for all FIXME comments. 2001-11-06 Per Cederqvist Code cleanup: Remove all traces of logins_allowed. (Bug 151). * src/server/session.c (login_old): Removed #if 0'd code that referenced logins_allowed. (login): Ditto. * src/server/person.c (create_person_generic): Removed #if 0'd code that referenced logins_allowed. * src/server/internal-services.h (logins_allowed): Removed declaration of this unused variable. Code cleanup. * src/server/cache-node.c (EMPTY_CACHE_NODE): Don't initialize the "snapshot" member. (Bug 100). * src/server/cache-node.h (cache_node): Removed the unused "snapshot" member. (Bug 100). 2001-11-04 Per Cederqvist Added bug tracking numbers to the expected failures in the test suite. * src/server/testsuite/lyskomd.0/14.exp: Added bug tracking numbers to the setup_xfail statements. * src/server/testsuite/lyskomd.0/20.exp: Added bug tracking numbers to the setup_xfail statements. Removed the unused pom.c and pom.h files. We don't have explicit permission to distribute them under GPL. * src/libraries/libmisc/Makefile.am (libmisc_a_SOURCES): Removed pom.h. * src/libraries/libmisc/pom.h: Removed. * src/libraries/libmisc/pom.c: Removed. Remove rcs.h and all uses of it. (Bug 140). * src/include/Makefile.am (noinst_HEADERS): Removed rcs.h. * src/include/rcs.h: Removed. * src/libraries/libcommon/kom-errno.c: Ditto. * All files: Don't include rcs.h. Remove rcsid variable. Simplify the code by breaking out loops from do_sub_comment and do_sub_footnote. * src/server/text.c (remove_misc_item): New function. (do_sub_comment): Use it to simplify code. (do_sub_footnote): Ditto. (Bug 186). Simplify the code by unifying do_add_recpt, do_add_cc_recpt and do_add_bcc_recpt. (Bug 190). * src/server/text.c (do_add_recipient): New function, that is like do_add_recpt, but with an additional Info_type argument that specifies what kind of recipient to add. (do_add_recpt): Function removed. (do_add_cc_recpt): Function removed. (do_add_bcc_recpt): Function removed. (create_text_add_miscs): Use do_add_recipient. Simplify code. (add_recipient): Ditto. Unify several fields in the Info_datum union. This makes it possible to handle recpt, cc_recpt and bcc_recpt by the same code in many places, resulting in the removal of approximately 300 lines of code. (Bug 139). * src/include/kom-types.h (Info_datum): Removed cc_recipient and bcc_recipient -- use recipient instead. Removed comment_to, commented_in, footnote_to and footnoted_in, and added text_link as a replacement. * src/server/text.c (find_recipient): Adjusted to Info_datum unification. Simplified code. (is_member_in_recpt): Ditto. (do_sub_recpt): Ditto. (is_sender): Ditto. (filter_secret_info): Ditto. (person_text_read_access): Ditto. (do_delete_text): Ditto. (check_double_subm): Ditto. (check_double_comm): Ditto. (create_text_check_misc): Ditto. (create_text_add_aux): Ditto. (is_comment_to): Adjusted to Info_datum unification. (is_footnote_to): Ditto. (do_add_footnote): Ditto. (do_add_comment): Ditto. (do_add_bcc_recpt): Ditto. (do_add_cc_recpt): Ditto. (do_sub_comment): Ditto. (do_sub_footnote): Ditto. (is_comm_sender): Ditto. (create_text_add_miscs): Ditto. * src/server/text-garb.c (garb_text): Adjusted to Info_datum unification. Simplified code. * src/server/ram-parse.c (fparse_misc_info): Ditto. * src/server/ram-output.c (foutput_misc_info): Ditto. * src/server/prot-a-parse.c (prot_a_parse_misc_info): Ditto. * src/server/prot-a-output.c (prot_a_output_misc_info): Ditto. * src/server/membership.c (add_rec_time): Ditto. * src/libraries/libcommon/misc-parser.c (parse_next_misc): Adjusted to Info_datum unification. * src/server/dbck.c (is_comment_to, is_commented_in) (is_footnote_to, is_footnoted_in): Adjusted to Info_datum unification. (is_recipient): Adjusted to Info_datum unification. Simplified code. 2001-11-03 Per Cederqvist Add references to Bugzilla for all relevant FIXME comments, and remove the others. All FIXME comments now use the same format. * src/server/aux-items.c: Added references to Bugzilla for all FIXME comments. * src/server/conference.c: Ditto. * src/server/conf-file.c: Ditto. * src/server/dbck.c: Ditto. * src/server/disk-end-of-atomic.c: Ditto. * src/server/internal-connections.c: Ditto. * src/server/internal-services.h: Ditto. * src/server/local-to-global.c: Ditto. * src/server/person.c: Ditto. * src/server/prot-a-parse.c: Ditto. * src/server/regex-match.c: Ditto. * src/server/server-config.c: Ditto. * src/server/simple-cache.c: Ditto. * src/server/text-garb.c: Ditto. * src/server/updateLysKOM.c: Ditto. * src/server/admin.c: Removed obsolete FIXME comments. * src/server/cache-node.c: Ditto. * src/server/log.c: Ditto. * src/server/session.c: Removed obsolete FIXME comments. Added references to Bugzilla for all remaining FIXME comments. * src/server/text.c: Ditto. * src/libraries/libmisc/numlist.c: Use FIXME instead of "+++" to note stuff that needs fixing. Don't enter these things into Bugzilla, since numlist.c isn't used. Remove unneeded casts. * src/server/ram-parse.c (fparse_aux_item_link): Removed unneeded cast. * src/server/prot-a.c (prot_a_parse_packet): Removed unneeded cast. Log warning messages for two conditions that should never occur. * src/server/membership.c: Added references to Bugzilla for all FIXME comments. (access_perm_helper): Log a warning if viewer_p == NULL. * src/server/connections.c: Added references to Bugzilla for all FIXME comments. (logout_client): Log a warning message if active_connection != NULL. 2001-10-29 Per Cederqvist * src/libraries/libansi/setsid.c (setsid): Updated a comment. (rcsid): Removed. 2001-10-28 Per Cederqvist Make more symbols private to aux-items.c. * src/server/aux-items.h (aux_item_add_perm): Now static; removed from this file. (find_aux_item_definition): Ditto. (find_aux_item_index): Ditto. (find_aux_item): Ditto. * src/server/aux-items.c (simple_aux_item): Added a cast for the name. (find_aux_item_definition): Added static modifier. (find_aux_item_index): Ditto. (aux_item_add_perm): Ditto. (find_aux_item): Ditto. (aux_item_trigger_mirror_faq): Ditto. (aux_item_trigger_link_item): Ditto. (aux_item_validate_existing_text): Ditto. (aux_item_trigger_mark_text): Ditto. (aux_item_trigger_unmark_text): Ditto. Code cleanup. * src/server/prot-a-parse.c (prot_a_parse_misc_info): Removed a couple of unnecessary casts. Enter "Future Changes" notes into Bugzilla. * doc/Protocol-A.texi (Future changes): Entered all future changes into Bugzilla. Refer to Bugzilla. (Bug 131). * doc/constructs.expected: Updated. Handle @w{} in Protocol-A.texi, and refine the checkargs.py. * doc/checkargs.py (lexer.pushback): New function. Use it for @w. Also use it, intstead of lexer.ignore, for @code, @uref, @footnote, @email, @asis, @samp, @pxref, @var, @emph, @xref, @badspell, @holl and @file. (lexer.__read_arg): Handle nested braces properly. * doc/Protocol-A.texi (Future changes): Fix markup error. 2001-10-27 Per Cederqvist Fixed the documentation of the user area. * doc/Protocol-A.texi (The User Area): The documented format was not the one used by the elisp-client and kom++. Updated the documentation to the current practice. (Bug 97). (Future changes): Added a link to Bugzilla for one of the ideas. The TODO list is now moved to Bugzilla @ Lysator. * README (Contact information): Mention http://bugzilla.lysator.liu.se/. * doc/IDEAS: All items are now moved to Bugzilla. * TODO: All unfixed items are now moved to Bugzilla. * HACKING: Mention bug 77 (removal of man-pages). 2001-10-26 Per Cederqvist Use difftime() to subtract time_t values. * src/server/rfc931.c (get_real_username): Use difftime() instead of '-'. (Bug 103). * src/server/dbck-cache.c (timerdiff): The tv_usec part of the timeval is ignore. Added a comment documenting that that is OK. 2001-10-04 Per Cederqvist * TODO (BUGZILLA-MARKER): Start to move stuff to http://bugzilla.lysator.liu.se/. Everything above the marker is copied into that bug reporting system. 2001-09-30 Per Cederqvist * Release 2.0.5. Release administrativa. * configure.in: Set version 2.0.5. * versions (SERVER-VERSION): 2.0.5. (SERVER-COMPAT-VERSION): 20005. * NEWS: Documented 2.0.5. * doc/Protocol-A.texi (Document Edition History): Document edition 10.5. Doc fix. * doc/lyskomd.texi (Aux-Item Definition File): Define what is meant by "owner" for the owner-delete property. Expand the test suite. * src/server/testsuite/lyskomd.0/21.exp: Test owner-delete handling, currently only on conferences. Release preparations. * README: Updated required version of Dejagnu. Say that it needs TCL and expect, and add URL:s to them. * HACKING: Updated required versions for automake and autoconf. Mention Python and DejaGnu. The validate regexp for mx-date allowed junk before and after the time. * run-support/aux-items.conf (mx-date): Anchor the regexp. Reported by Per Starbäck. * src/server/testsuite/lyskomd.0/20.exp: Added tests for the syntax of the mx-date aux-item. 2001-09-29 Per Cederqvist Write tests for aux-items 32 and 10100-10104, and discover a minor conference number leak. * src/server/testsuite/lyskomd.0/20.exp: Write tests for aux-items 32 and 10100-10104. * src/server/person.c (create_person_generic): This can leak conference numbers. Write a comment about it. * src/server/conference.c (do_create_conf): Ditto. * doc/lyskomd.texi (Adding Aux-Item Types): Talk more about test cases. Write test cases for aux-item 31 (canonical-name), and fix a bug in the validate regexp. * src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added 20.exp. * run-support/aux-items.conf (canonical-name): Added a missing "?" to the validate regexp: the port number part should be optional. * src/server/testsuite/lyskomd.0/20.exp: New file that is intended to check aux-item 31, 32 and 10100-10104. Tests for aux-item 31 are written now. Cleanup. * src/server/testsuite/lyskomd.0/13.exp: State what this test is about. * src/server/testsuite/lyskomd.0/03.exp: Removed an unneeded "sleep 2" and some disabled code that is no longer needed. Mark where letterbox auxitems should be added. Fix release lint. * src/server/testsuite/lyskomd.0/Makefile.am (MOSTLYCLEANFILES): Added aux-items-18.conf. (EXTRA_DIST): Added regexp-match-cov.exp. * src/server/testsuite/lyskomd.0/18.exp (copy_aux): New function. Use built-in TCL support instead of system "cp ..." to copy files. Remove the target file before copying a file to it, to avoid permission problems. Use copy_aux everywhere that aux-items-18.conf was created. * src/server/testsuite/Makefile.am (EXTRA_DIST): Added l2g.0/12.exp (MOSTLYCLEANFILES): Added usage.all. * src/server/Makefile.am (MOSTLYCLEANFILES): Added version-info.c and prot-a-parse-arg.c. (nodist_lyskomd_SOURCES): New target. (nodist_dbck_SOURCES): New target. (NODIST_PROTA): New variable. Moved prot-a-parse-arg.c from PROTA to this variable. (NODIST_GENOBJS): New variable. Moved version-info.c from DISKOBJS to this variable. (NODIST_DISKOBJS): New variable. (NODIST_DBCK): New variable. Moved version-info.c from DBCK to this variable. * src/libraries/libansi/Makefile.am (MOSTLYCLEANFILES): Added *.da, *.bb, *.gcov and *.bbg. * run-support/Makefile.am (EXTRA_DIST): Added aux-items.conf. (uninstall-local): Remove config, but only if it isn't modified. * doc/Makefile.am (MOSTLYCLEANFILES): Added *.tmp. (EXTRA_DIST): Added checkargs.py and constructs.expected. * db-crypt/db/Makefile.am (uninstall-local): New target. Remove lyskomd-data and lyskomd-texts, but only if they are unmodified. 2001-09-23 Per Cederqvist * HACKING: Run extended tests as part of the release process. Fixed a bug that caused async-new-recipient to not be sent in some cases when passive memberships were involved. * src/server/text.c (is_member_in_recpt): Added patch by Joel Rosdahl so that bcc-recpt are really skipped over instead of producing false negatives -- a later cc-recpt or recpt can now produce a positive answer. * src/server/testsuite/lyskomd.0/gen-19.py: New file. This is mostly a copy of gen-15.py, but changed so that combinations of passive and active memberships are tested. * src/server/testsuite/lyskomd.0/Makefile.am (check_DATA): Added 19.exp. (19.exp): New target. (EXTRA_DIST): Added 16.exp, 17.exp, 18.exp, 19.exp and gen-19.py. Add progress message on slow tests. * src/server/testsuite/lyskomd.0/gen-15.py: Added some documentation. (simple_create_delete): Print progres messages when running extended tests. (simple_create_add_delete): Likewise. Re-enable all tests. * src/server/testsuite/lyskomd.0/01.exp: Enable some matching that David Byers commented out yesterday. The test works for me. The re-enabled lines are marked with a "NOTE:" comment. * src/server/testsuite/lyskomd.0/03.exp: Ditto. Port to DejaGnu 1.4.2/TCL 8.3/expect 5.32.2. * src/server/testsuite/lyskomd.0/14.exp: Use "*-*-*" instead of "*" as argument to setup_xfail, as required by DejaGnu 1.4.2. * src/server/testsuite/config/leaks.exp (startup_leaks): Don't use variable substitution in default arguments. It doesn't work. Port to Python 2.1. * src/server/testsuite/tcpconnect.py: Use string.replace instead of regsub.gsub. Port to autoconf 2.52/automake 1.5. * doc/Makefile.am: Stop complaints from automake by using "##" instead of "#" as comment leader in commands. * configure.in: Adjusted to autoconf 2.52: AC_INIT now takes package name and version as arguments. Use AC_CONFIG_SRCDIR. Use AC_HELP_STRING to format help strings. Use CMOD_CHECK_CC_OPT instead of CMOD_COMPILER_CC_ACCEPTS. Use AC_CONFIG_FILES. * acinclude.m4 (CMOD_COMPILER_CC_ACCEPTS): Removed. (CMOD_CHECK_CC_OPT): New macro. 2001-09-22 Per Cederqvist Code cleanup. * src/server/updateLysKOM.c (checkstatus): Use sizeof(lbuf) instead of 80. 2001-09-22 Per Cederqvist Document the "owner-delete" aux-item configuration parameter. * doc/lyskomd.texi (Aux-Item Definition File): Document owner-delete. Back out the patch from Joel Rosdahl for now. * src/server/text.c: Back out a patch from Joel Rosdahl that was included in the last commit by David Byers. The patch is probably good, but there was no changelog entry, and (more importantly) I want to write test cases that illustrates the problem before applying the fix. Whitespace fixes. * src/server/aux-items.c (check_delete_aux_item_list): Indentation fixes. (aux_inherit_items): Indentation fix. 2001-09-22 David Byers Port the test suite to a modern dejagnu. * src/server/testsuite/config/unix.exp (l2g_start): Use exp_continue instead of continue -expect. (lyskomd_start, lyskomd_fail_start, dbck_run): Ditto. * src/server/testsuite/lyskomd.0/11.exp: Use exp_continue instead of continue -expect. Test suite fixes. * src/server/testsuite/lyskomd.0/01.exp: Expect aux-item 31, 32 and 10100-10104 to exist. * src/server/testsuite/lyskomd.0/03.exp: Ditto. * src/server/testsuite/lyskomd.0/18.exp: Ditto. Added the "owner-delete" aux-item configuration parameter. * src/server/aux-items.c (check_delete_aux_item_list): Rewrote check for delete permissions as multiple if-elseif statements instead of a compound expression, 'cause the compound expression was getting just a little bit difficult to understand. * run-support/aux-items.conf (redirect): Set owner-delete. (x-face): Ditto. (pgp-public-key): Ditto. (e-mail-address): Ditto. (faq-text): Ditto. (allowed-content-type): Ditto. * src/server/text.c (modify_text_info): Added author as owner argument to check_delete_aux_item_list. * src/server/admin.c (modify_system_info): Added zero as owner argument to check_delete_aux_item_list. * src/server/aux-item-def-parse.y (assign): Added owner-delete. * src/server/aux-items.c (empty_aux_item_definition): Added value for owner_delete. (simple_aux_item): Ditto. * src/server/aux-items.h (struct Aux_item_definition_s): Added owner_delete field after may_not_delete. (check_delete_aux_item_list): Added owner parameter. * src/server/aux-items.c (check_delete_aux_item_list): Add owner parameter. Check owner_delete to see if object owner may delete item. * src/server/conference.c (modify_conf_info): Pass conference supervisor to check_delete_aux_item_list. 2001-09-22 Per Cederqvist Document that clients should allow conferences to be looked up by number. * doc/Protocol-A.texi (VERSION): Bugfix: set to 2.0.4, not 1.0.4. (Client-side name expansion): New node. 2001-05-24 Per Cederqvist * Protocol-A.texi 10.4 released. Added new aux-items to aux-items.conf. * run-support/aux-items.conf: Added canonical-name [31], mx-list-name [32] mx-mime-belongs-to [10100], mx-mime-part-in [10101], mx-mime-misc [10102], mx-envelope-sender [10103] and mx-mime-file-name [10104]. Fix "make check". * doc/checkargs.py (lexer.ignore): Ignore @file and @TeX. New aux-items: canonical-name and mx-list-name. Two cross references added. * doc/Protocol-A.texi (Aux-Item Types): Added canonical-name [31] and mx-list-name [32]. (Predefined Aux-Item Types): Added a cross reference to Aux-Item Types. (query-predefined-aux-items): Likewise. (Document Edition History): Document edition 10.4. 2001-05-23 Per Cederqvist Fix the update-www target in doc. * doc/Makefile.am (protocol-a.html): New target. (update-www): Give up on DVI and PDF. texinfo.tex is currently too broken for my macro usage. Fix the generation of HTML and Info for the web page. Texinfo tweaking. * doc/Protocol-A.texi (Preface): Rearrange conditionals so that some duplicated text can be removed. 2001-05-20 Per Cederqvist The documentation for the old-pwd argument to set-passwd was wrong. * doc/Protocol-A.texi (set-passwd): old-pwd must match the password of the currently logged in person, not of the person whose password is being changed. Texinfo tweaking. * doc/Protocol-A.texi (Top): Fix braino ("protocol" -> "request"). (get-session-info-ident): Fix TeX complaints. (map-created-texts): Likewise. Remove trailing @c in macro blocks. They are not needed, and they do some harm. (daemon): Move macro definition to avoid using @badspell before that macro is defined. 2001-05-17 Per Cederqvist More Protocol-A.texi tweaks. * doc/Protocol-A.texi (Top, Concepts, The Aux-Item List) (Fundamentals, LysKOM Data Types, Who Information) (Protocol Requests, Asynchronous Messages, Common Commands): Menu descriptions added. (get-text): @badspell added in example. (Who Information): These types are all obsolete. Almost. (Client-Server Dialog): Mention asynchronous messages. 2001-05-13 Per Cederqvist Spell-check Protocol-A.texi. * doc/Makefile.am (check-doc): Ignore @holl and @badspell. * doc/checkargs.py (lexer): Ignore @badspell, @holl and @daemon. * doc/Protocol-A.texi: Added spell-ignore and spell-end-ignore about several regions where spell checking doesn't make sense. Removed rcsid line. Added ispell magic after @bye. Several spelling errors fixed. (daemon, badspell): New macros. Use them where appropriate. (holl): New macro. Change all examples of Hollerith-coded strings to use this. (re-z-lookup): Fixed broken length of Hollerith string in the example. * doc/Makefile.am (check-doc): Ignore stuff after @bye. 2001-05-09 Per Cederqvist New predefined aux-items: 10100-10104. * doc/Protocol-A.texi (Predefined Aux-Item Types): State that client-specific aux-items can be redefined as predefined. (Client-Specific Aux-Item Types): Likewise. (komimportmail Aux-Item Types): Node removed. Contents moved to "Aux-Item Types". (Aux-Item Types): Added mx-mime-belongs-to [10100], mx-mime-part-in [10101], mx-mime-misc [10102], mx-envelope-sender [10103] and mx-mime-file-name [10104]. 2001-05-08 Per Cederqvist * doc/Protocol-A.texi (Aux-Item Types): Use text/x-kom-basic instead of x-kom/basic in the examples. (Reformattable Text (text/x-kom-basic)): New name for former "Reformattable Text (x-kom/basic)". Mention that the type was previously known as x-kom/basic. Removed a few nodes that contained no information. * doc/Protocol-A.texi (Conference Lists (x-kom/conflist)): Empty node removed. (Only read the most recent N texts): Likewise. (Review the last N by FOO to BAR): Likewise. (Remote control): Likewise. 2001-05-05 Per Cederqvist Update checkargs.py for todays edits of Protocol-A.texi. * doc/checkargs.py (lexer.run): It is not OK to reach EOF. (lexer.ignore): Ignore @display. (lexer.toplevel_bye): Exit when reaching "bye". (lexer.__parse_userdefined_types): Ignore @need commands. Separate sentences with two spaces, not one, as per the Texinfo documentation. * doc/Protocol-A.texi: Sentences in Texinfo should end with double spaces. Set sentence-end and sentence-end-double-space in the local variables section, and update the entire document with lots of scattered whitespace changes. Split and move text in Protocol-A.texi to make the generated Info file more useful. * doc/Protocol-A.texi (LysKOM Data Types): Split into several subnodes. Updated all cross references to point to the relevant subnode. (Protocol Notation): New node. Move text here to avoid too much text before menus in Info and HTML output. Describe the syntax of call headings. (About Asynchronous Messages): New node. Move text here to avoid too much text before menus in Info and HTML output. Remove redundancy in the description of error messages. Fix the wording of the error messages that may be sent during connection establishment. Mention that the client can issue several calls at once, and that replies are sent in order. * doc/Protocol-A.texi (Connecting to the Server): New node, containing the first part of the "Client-Server Dialog" node. Added a footnote about "Protocol A" and "Protocol B". Added some missing markup. Don't talk about what happens when a protocol other than Protocol A is used. The error message for an unsupported protocol is "%%LysKOM unsupported protocol.", not "%%Unsupported protocol". The error message used when no connections are available was lacking the trailing dot. (Client-Server Dialog): Much text moved to "Connecting to the Server". Mention that the client can issue several calls without waiting for the replies, but that it must read replies when they arrive. Mention that the replies are sent back in the proper order, but that clients are wise not to rely on that. Renamed error-no in the error-reply to error-code, to make the document more coherent. Changed the type of error-code to INT32, and removed the types Error-No and error-no. Added the "insane token length" and "insane array size" error messages to protocol-error. (Error Responses): Node removed. The old contents were moved into "Client-Server Dialog" or discarded because it was redundant. (Protocol Error Messages): New name for former "Special Errors". Removed "%%No connections left.", since that message is only sent during connection establishment. (Error Codes): Refer to error-status, not error-code. (Future changes): Talk about why giving the server freedom to reorder the replies may be beneficial, and how it can be done without breaking any clients. 2001-05-04 Per Cederqvist Minor Protocol-A edits. * doc/Protocol-A.texi (Error Codes): Introductory text added. 2001-05-03 Per Cederqvist More minor Protocol-A fixes. * doc/Protocol-A.texi (Future changes): The mark-as-unread call is missing. (Error Responses): New name for former "Error Codes". Moved to inside the "Client-Server Dialog" chapter. (Special Errors): Moved inside the "Client-Server Dialog" chapter. (Error Codes): New name for former "Normal Errors". 2001-05-01 Per Cederqvist Some minor Protocol-A.texi fixes. * doc/Protocol-A.texi (mark-as-read): Typo fixed: "as" -> "at". (create-text): Added missing @misc markup. (Name Expansion): Removed the "Case Conversion" heading, as the collate table is only relevant for "KOM Conventions" name expansion. Update the information with a link to the get-collate-table request. (The Misc-Info List): Mention that bcc-recpt are converted to cc-recpt only when visible. (Client-Server Dialog): Spelling error fixed. Mention that not-implemented works only if the client follows the strict rules regarding whitespace in protocol requests. (set-conf-type): Name the "four-bit conference type". (get-conf-stat-old): This returns a Conference-Old, not a Conference. (Future changes): Complain about super conferences, the securty system, and last-text-read/read-texts. Move some stuff to appendices in Protocol-A.texi, and move some other stuff around. * doc/Protocol-A.texi (Concepts): New name for former "Introduction". (The User Area (x-kom/user-area)): Added a reference to "The User Area". * doc/Protocol-A.texi (Preface): New name for former "Overview". (Notation): Section moved from "Overview" to "Fundamentals". (Client-Server Dialog): Section moved from "Introduction" to "Fundamentals". (Fundamentals): New name for former chapter "Data Types". (LysKOM Data Types): Moved from "Data Types" to a separate chapter. All subsections moved up one level. (Name Expansion): All subsections moved up one level -- the level was wrong. (Aux-Item Types, Predefined Aux-Item Types): Moved the list of predefined aux-items to the new chapter Aux-Item Types. * doc/checkargs.py (lexer): Ignore @appendix. * doc/Protocol-A.texi (Document Edition History): Moved to a separate appendix. (Protocol Version History): Moved to a separate appendix. (Name Expansion): Moved to a separate chapter. (Writing Clients): Now an appendix, not a chapter. (Importing and Exporting E-Mail): Likewise. (Articles, LysKOM Data Types): Don't say that the misc-info list will be removed in the future. Move such speculation to a new appendix. (Future changes): New appendix. (Articles): Clarify the discussion about local and global text numbers. (Persons and Sessions): Make this a @section instead of a @subsection to Conferences. 2001-05-01 Per Cederqvist Make all types in requests and asynchronous messages clickable in HTML. Prepend @i{Example:} to *all* request examples. Added a missing example. Avoid @iftex constructs in the document body. * doc/Makefile.am (check-doc): Ignore @anchor and @lt. * doc/checkargs.py (lexer): Ignore @need, @reqexample and @anchor. (lexer.__parse_userdefined_types): Handle @anchor. (lexer.__parse_type): Requre @lt markup. (lexer.__get_lt_token): New method. (lexer.__get_token): Handle the new tokens '{' and '}'. (lexer.__parse_userdefined_types): Expect @lt{} markup (lexer.__parse_userdefined_struct): Likewise. (lexer.__parse_userdefined_selection): Likewise. (lexer.__parse_userdefined_enumeration_of): Likewise. * doc/Protocol-A.texi (@reqexample): New macro. Use it in front of every example of request usage. Previously, many but not all examples were introduced by a @i{Example:} line. That line is now included in the @reqexample macro, together with a "@need 2000" statement. (IAM, Pell, Kent, presconf): New values, to handle TeX/Info incompatibilities regarding Latin-1 characters without having to clutter the document with @iftex constructs. Removed all related @iftex constructs in the body of the document. @ae{} can be used in both Info and TeX mode; do so. (set-super-conf): Missing example added. (Simple Data Types): Add @anchor targets for all types. (LysKOM Data Types): Likewise. (@lt): New macro. Use it in all requests and asynchronous messages to mark up the types. (LysKOM Data Types): Added @lt markup around all types on the right hand side. 2001-04-30 Per Cederqvist Added macros @asynclink and @asyncdlink. * doc/checkargs.py (lexer): Ignore asynclink. (lexer.toplevel_asyncdlink): New method. * doc/Protocol-A.texi (@asynclink, @asyncdlink): New macros. Use them instead of @link where appropriate. (Asynchronous Messages): Use @reqlink instead of @req. * doc/Makefile.am (check-doc): Handle @asynclink and @asyncdlink. Check documentation of asynchronous messages. * doc/Makefile.am (check-doc): Create requests-numbered.tmp. Create asyncs-numbered.tmp. Omit DEBUG_CALLS-only asynchronous messages from "async.h". * doc/Protocol-A.texi: Create the "am" index for asynchronous messages. Add @amindex and @aarg markup for all asynchronous messages, and remove the trailing semicolon in the argument list. Merge all indices into one. (add-member): Malformed sentence fixed. (async-i-am-off, async-i-am-on-obsolete): Mark as obsolete, and tell why they are no longer used. (async-broadcast): Mark as obsolete. (Type Index, Request Index): Removed. (Index): Added. * doc/checkargs.py (lexer.__init__): Initialize __amindex, __defined_asyncs and __implemented_asyncs. (lexer): Ignore @defcodeindex and @syncodeindex. (lexer.toplevel_node): Check for undocumentet arguments to asynchronous messages. (lexer.toplevel_findex): Check for @amindex entries in @findex nodes. (lexer.toplevel_amindex): New method. (lexer.__parse_async): New method. (lexer.toplevel_aarg): Implemented. (lexer.toplevel_bye): Check for unterminated @amindex nodes and undocumented asynchronous messages. * doc/checkargs.py (lexer.__init__): Read requests-numbered.tmp. (lexer.toplevel_findex): Check that the same request name isn't used twice. (lexer.toplevel_bye): Check that all implemented requests are documented. (lexer.__parse_request): Check that the proper request number is used, and that the request is really implemented. Check type definitions, that all types are used, and some related stuff. Renamed ENUMREATION_OF to ENUMERATION-OF. * doc/Protocol-A.texi (Simple Data Types): Renamed ENUMERATION_OF to ENUMERATION-OF. Nothing else uses "_". The only user updated. (LysKOM Data Types): Missing semicolon added. * doc/checkargs.py (defined_types): New variable. (number_suffixed): New function. (prot_a_type): New class, with several derived classes. (reader.error): Allow the line number to be a string, such as '*builtin*'. (lexer.__init__): Added 'ENUMERATION-OF' to the set of builtin aggregates. Add builtin types to defined_types. (lexer): Ignore @dots{}. (lexer.toplevel_bye): Check that all defined types are used. (lexer.toplevel_tindex): Pass a list of the @tindex entries to __parse_userdefined_types, so that that function can check that they are all defined. (lexer.__parse_userdefined_types): Implemented. Several helper functions introduced. (lexer.__parse_type): Simplified. Do some error checking and bookkeeping. Return a tuple, so that it is easier for the caller to see if an array was used. All callers updated. (lexer.__bad_arg): Accept "reservedX" and "flgX" for numerical values of X. (lexer.__get_token): Handle the new tokens "::=", "|" and "=". Ignore comments (introduced with "!"). 2001-04-29 Per Cederqvist Minor fixes to the protocol specification. * doc/Protocol-A.texi: Use @dots{} instead of "...". (Simple Data Types): Use "::=" instead of ":" in two places. Added missing @example...@end example markup. Fixed the SELECTION example -- the tail is not optional. @reqdlink now works when using TeX. * doc/Protocol-A.texi: Added a proper definition of @reqdlink for TeX, written by David Byers. Use "@tex" instead of "@begin tex". * doc/checkargs.py (lexer): Ignore @tex. 2001-04-28 Per Cederqvist Check case of user-defined types. * doc/checkargs.py (lexer.__init__): Set __builtin_types, __builtin_aggregates, __builtin_typelike, __tindex_seen and __types_used. (lexer.__seen_type): New method. (lexer.toplevel_tindex): Implement. (lexer.__parse_userdefined_types): New method, not yet implemented. (lexer.__bad_type): Check that the casing rules for user-defined types are adhered to. * doc/Protocol-A.texi (set-pers-flags): Fixed typo. Check @linkhere usage. Stricter parens checking. * doc/checkargs.py (reader.check_paren_null): New name for former check_paren_eof. All callers updated. Clear __parenstack, so that errors are reported only once. (lexer.__init__): Initialize __linkhere. (lexer.toplevel_node): Check that no @linkhere or closing parenthesis are pending. (lexer.toplevel_reqdlink, lexer.__assert_no_linkhere) (lexer.toplevel_linkhere): New methods. Renamed modify_server_info to modify_system_info, to match Protocol-A.texi. * src/include/services.h (modify_system_info): New name for former modify_server_info(). * src/server/admin.c: Likewise. * src/server/fncdef.txt: Likewise. Mark up all requests and fix all references in Protocol-A.texi. Check for balanced parenthesis. * doc/checkargs.py (reader.parens, reader.rev_parens): New constants. (reader.__init__): Initialise __parenstack, __errfound and __quoted. (reader.error, reader.errfound): New methods. (reader.ungetc, reader.getc_eofok): Handle quoting and parens nesting. (reader.check_paren_eof): Report unbalanced parens at EOF. (lexer.__init__): Moved __errfound to the reader class. (lexer.run): Check for unbalanced parens at EOF. (lexer.toplevel_reqlink): Ignore. (lexer.toplevel_reqdlink, lexer.toplevel_linkhere): Ignore, for now. We should check nesting et c of these. (lexer.toplevel_unmacro): Ignore. (lexer.error): Moved the implementation to the reader class. This is only a wrapper. * doc/Makefile.am (check-doc): Add @reqlink and @reqdlink to requests-@.tmp. * doc/constructs.expected: Added "@linkhere{}". * doc/Protocol-A.texi: Use @reqlink and @reqdlink where appropriate. Fix lots of malformed @ref, @xref and @pxref usages. Also: (@reqlink, @reqdlink, @linkhere): New markup macros. (Document Edition History): Added missing @async markup. (About Aux-Items): Added missing @field markup. (Simple Data Types): Removed an unbalanced close parenthesis. (LysKOM Data Types): Added missing @field markup. Removed an unbalanced close parenthesis. (lookup-name): Added a missing close parenthesis. (get-info-old): Added a missing close parenthesis. This returns Info-Old, not Info. (create-anonymous-text-old): Added missing @field markup. (login): Added missing close parenthesis. (local-to-global): Don't use fancy mathemtical notations for half-closed intervals. Added missing @type markup. 2001-04-23 Per Cederqvist Don't omit stuff when formatting Protocol-A.texi as HTML. * doc/Protocol-A.texi: Use @ifnottex instead of @ifinfo almost everywhere that @ifinfo was used. (re-z-lookup): Added missing spaces in the example. (lookup-z-name): Likewise. (get-members): Likewise. (Protocol Requests): Removed text about "upright text" in the replies in the examples, since no such text exists. 2001-04-19 Per Cederqvist Fix a couple of Protocol-A.texi errors. * doc/Protocol-A.texi (Protocol Requests): Mention that extra newlines sometimes are used in the examples. (create-person): Language fix. 2001-04-18 Per Cederqvist Fix a few more Protocol-A.texi errors. * doc/Protocol-A.texi (get-membership-old): Use a "want-read-texts : BOOL" argument instead of "mask : BITSTRING(want-read-texts)". The result is the same, but using BOOL makes the prototype easier to read. Document the argument more verbosely. (get-membership): Do likewise. (login): Do likewise for the "invisible" argument. (create-anonymous-text-old): Added @misc{} markup. * doc/constructs.expected: Updated. Fix lots of minor errors in Protocol-A.texi. Document that the invitation membership flag is automatically set in some circumstances. * doc/checkargs.py (lexer.__bad_arg): Added a missing __unget_token to get a better error message. * doc/Protocol-A.texi: Fix all @rarg{} arguments that used the wrong argument name. Edit all request prototypes so that the consistently use semicolon as an argument delimiter, not an argument terminator. Add missing @rarg{} markup. (Protocol Version History): Remove a trailing space. (get-membership-old): Use @field{read-texts} instead of @rarg{read-texts}. (get-created-texts): Added missing '->' token. (create-anonymous-text): Added @misc{} markup. (create-person): Use @priv{create-pers} instead of @rarg{create-pers}. (modify-system-info): Docuent items-to-delete and items-to-add. (add-member): Document type, including the fact that the invitation field is sometimes set automatically. Check that @rarg{} is used correctly. * doc/Makefile.am (check-doc): Depend on info. so that checkargs.py is only run on a file that makeinfo can process. Run checkargs.py on Protocol-A.texi. * doc/checkargs.py: New file. * doc/lyskomd.texi: Break overly long lines. 2001-04-16 Per Cederqvist Fix comments. * src/server/async.h: Don't refer to removed files. * src/include/kom-types.h: Likewise. * HACKING: There are version numbers in Protocol-A.texi as well. Prepare Protocol-A.texi for web publication. Add and check domain-specific markup. * doc/Makefile.am (.texi.notab): Check that no lines are more than 79 characters long. (update-www): New target. This is work in progress and does not yet work. (Protocol-A.pdf): New target. (check): Depend on check-doc. (check-doc): New target. This is work in progress, but it already performs several useful sanity checks on Protocol-A.texi. * doc/.cvsignore: Ignore *.tmp, Protocol-A.pdf, protocol-a.html, and stamp-vti1. * doc/constructs.expected: New file, that enumerates the expected @-constructs in Protocol-A.texi. * doc/Protocol-A.texi (PROTOEDITION, PROTOVER, VERSION): New constants. Use them throughout the document instead of 10.3, 10 and 1.0.4. Bump PROTOEDITION to 10.4. Added an explicit permission to process the texi file with TeX. Ensure that all permission notices are equal. Print all version information on the title page. Moved the contents to the front of the document, and avoid printing them in the html document. Add HTML links to Lysator and LysKOM before the first node. (Top): Enclose this node in @ifnottext instead of @ifinfo. Refer to the web site. (Overview): Include all version numbers and the canonical URL for the protocol specification here as well, but only @iftex. (Document Edition History): New name for former node "Document Revision History". Use the term "edition" throughout the document. Added a not for edition 10.4. (Predefined Aux-Item Types, create-anonymous-text-old) (create-anonymous-text, modify-system-info): Get rid of overfull hbox messages from TeX. (Type Index, Request Index): Use @unnumbered instead of @chapter. (all call nodes): Replaced "@unnumberedsubsec Error codes" with "@subheading Error codes" so that they are not included in the table of contents, and so that the PDF menus work better. (Overview, Document Edition History): TeX lint. (@req, @aux, @async, @type, @priv, @conftype, @misc, @rarg, @aarg) (@errorcode, @field): New Texinfo macros. Use them where appropriate. 2001-04-13 Per Cederqvist Register the undocumented "rkom" user-area block. * doc/Protocol-A.texi (set-client-version): The client names are "registered", not "reserved". (The User Area): Registered the "rkom" block. 2001-04-10 Per Cederqvist Protocol A: Document the hello string. Improve the recommended algorithm for determining what a client has unread. * doc/Protocol-A.texi (Client-Server Dialog): Document the format of the hello string. Fix the example. (What do I have unread): Recommend that clients use get-uconf-stat instead of get-conf-stat. 2000-11-08 Per Cederqvist Typo fixed. * README: Fixed typo ("IP address" -> "hostname"). Reported by Andreas Ehliar. 2000-09-06 Per Cederqvist * Release 2.0.4. Remove Y2k bug. * src/server/prot-a-output.c (prot_a_output_time): Remove stupid Y2k joke.q Added missing files to the distribution. * src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added gen-15.py. Test and document SIGWINCH (re-read aux-item.conf). * src/server/testsuite/lyskomd.0/18.exp: New file, testing SIGWINCH. * src/server/testsuite/lyskomd.0/04.exp: Add $srcdir to the front of the aux-item file name when calling lyskomd_start. * src/server/testsuite/lyskomd.0/aux-items-cov.exp: Likewise. * src/server/testsuite/leaks.0/leaks10.exp: Add $srcdir to the front of the aux-item file name when calling startup_leaks. * src/server/testsuite/leaks.0/leaks99.exp: Likewise. * src/server/testsuite/config/leaks.exp (startup_leaks): Added $srcdir to aux-item file. * src/server/testsuite/config/unix.exp (lyskomd_start): Don't add $srcdir to the name of the aux-item file. (lyskomd_fail_start): Likewise. * doc/lyskomd.texi (Parameters): aux-items.conf is reread when a SIGWINCH is received. (Signals): Likewise. Document the new visibility rules for bcc-recpt. * doc/Protocol-A.texi (The Misc-Info List): Fix the description of the visibility of bcc-recpt. Clarify the documentation for mark-as-read. * doc/Protocol-A.texi (mark-as-read): State that it isn't necessary for clients to call mark-as-read on deleted texts. 2000-09-05 Per Cederqvist Set version numbers. * versions (SERVER-VERSION): 2.0.4. (SERVER-COMPAT-VERSION): 20004. * configure.in: Set version number to 2.0.4. * README: Updated for the 2.0.4 release. * doc/Protocol-A.texi: This is revision 10.3. (Document Revision History): Documented changes for 10.3. Various cleanup. * doc/lyskomd.texi (Overview): Remove mal-placed plug about the cool free software company Cendio Systems. * src/server/testsuite/lyskomd.0/gen-15.py (DEBUG): Set to 0. Don't leak secret information when telling about the current working conference. * src/server/testsuite/lyskomd.0/16.exp (assert_0): No longer excpect these tests to fail. * src/server/session.c (who_is_on): Don't send info about secret conferences. (who_is_on_ident): Likewise. (who_is_on_dynamic): Likewise. (get_session_info): Likewise. (get_session_info_ident): Likewise. (who_is_on_old): Likewise. * src/server/send-async.c (async_i_am_on): Don't send info about secret conferences. * src/server/membership.c (filter_conf_no): New function. * src/server/manipulate.h (filter_conf_no): New function. 2000-09-04 Per Cederqvist Implement the aux-items recommended-conf and allowed-content-type. * src/server/testsuite/lyskomd.0/01.exp: Expect aux-item 29 and 30 to exist. * src/server/testsuite/lyskomd.0/03.exp: Expect aux-item 29 and 30 to exist. Give Kelly Talisman two allowed-content-type aux-items. Renumber. * run-support/aux-items.conf: faq-text may be set on the server. Added recommended-conf and allowed-content-type. * src/server/testsuite/lyskomd.0/17.exp: New test. * doc/Protocol-A.texi (Predefined Aux-Item Types): Added lots of things that aux-items can be set on: cross-reference += letterbox redirect += letterbox x-face += letterbox, server alternate-name += letterbox mx-allow-filter += letterbox mx-reject-forward += letterbox allowed-content-type += letterbox, server Updated the description of the allowed-content-type aux item. Typo fixed. * doc/Protocol-A.texi (Protocol Requests): Typo in menu fixed. Fix the visibility of bcc-recipients, so that the same rules are used everywhere. Tighten the rules so that secret info cannot leak through get-text-stat. * src/server/testsuite/lyskomd.0/gen-15.py (text_stat): New class. Rewrite the rest of this file to use it. Give authors special privileges regarding bcc-recpts. * src/server/testsuite/lyskomd.0/10.exp: Removed an obsolete comment, since this test no longe fails. * src/server/testsuite/config/unix.exp (lyskomd_start): The tests now require more than 2000 texts. Give them 20000. * src/server/text.c (send_async_sub_recipient): Use filter_secret_info() so that the exact same visibility is used by async-sub-recipient and get-text-stat. (filter_secret_info): Don't allow the author of a text to see bcc-recpt which are secret to him. Simplify the code slightly. (send_async_add_recipient): Use filter_secret_info() so that the exact same visibility is used by async-add-recipient and get-text-stat. 2000-09-02 Per Cederqvist Re-indent text.c. Add a few const qualifiers. * src/server/text.c: Code re-indented. (count_recipients): const qualifiers added to some arguments. Code simplified. (count_footn): Likewise. (count_comment): Likewise. (text_read_access): Code clarified. (delete_text): Likewise. (find_recipient): qualifiers added to some arguments. (is_comment_to): Likewise. (is_footnote_to): Likewise. (submit_to): Likewise. (is_member_in_recpt): Likewise. (send_async_sub_recipient): Likewise. (sender): Likewise. (is_sender): Likewise. (is_comm_sender): Likewise. (check_footn): Likewise. (check_comm): Likewise. (locate_mark): Likewise. (skip_recp): Likewise. (recp_sent_by): Likewise. (filter_secret_info): Likewise. (send_async_deleted_text): Likewise. (check_double_subm): Likewise. (check_double_comm): Likewise. (send_async_new_text_old): Likewise. (send_async_new_text): Likewise. (send_async_add_recipient): Likewise. * src/server/membership.c (access_perm_helper): const qualifiers added to some arguments. (access_perm): Likewise. (locate_membership): Likewise. * src/server/dbck.c (locate_membership): const qualifiers added to some arguments. * src/server/conference.c (is_supervisor): const qualifiers added to some arguments. (is_strictly_supervisor): Likewise. * src/server/manipulate.h: (access_perm): const qualifiers added to some arguments. (is_supervisor): Likewise. (is_strictly_supervisor): Likewise. (locate_membership): Likewise. * src/server/aux-items.c: Lots of const qualifiers added. * src/server/aux-items.h (Aux_item_validation_data): const qualifiers added to the item and def members. (aux_inherit_items): const qualifiers added to some arguments. (aux_item_add_perm): Likewise. (prepare_aux_item): Likewise. (find_aux_item_definition): Likewise. (aux_item_find_trigger): Likewise. (aux_item_find_validator): Likewise. (find_aux_item): Likewise. (filter_aux_item_list): Likewise. (delete_aux_item_list): Likewise. (undelete_aux_item_list): Likewise. (check_delete_aux_item_list): Likewise. Test suite cleanup. * src/server/testsuite/lyskomd.0/16.exp (assert_0): New proc. Use it to simplify the code. 2000-08-28 Per Cederqvist Secret conference numbers can apparently leak from the get-session-info and who-is-on family of functions. Test cases added. * src/server/testsuite/lyskomd.0/16.exp: Added test cases for async-i-am-on, who-is-on-old, who-is-on, get-session-info, who-is-on-ident, get-session-info-ident and who-is-on-dynamic. They all leak info about secret conferences. 2000-08-12 Per Cederqvist More work on test cases for async messages 14-17. * src/server/testsuite/lyskomd.0/gen-15.py: Test simple create+add+delete. 2000-08-09 Per Cederqvist Start writing test cases for async messages 14-17. * src/server/testsuite/lyskomd.0/gen-15.py: New file. This is very far from complete. * src/server/testsuite/Makefile.am (SUBDIRS): Added lyskomd.0. (EXTRA_DIST): Moved all files in lyskomd.0 to that makefile. (check-lyskomd): Depend on check-recursive. * configure.in: Remove -Wpointer-arith since it gives a lot of false warnings when using glibc-2.1.3 and gcc-2.95.2. Create src/server/testsuite/lyskomd.0/Makefile. * src/server/testsuite/lyskomd.0/Makefile.am: New file, mostly extracted from ../Makefile.am. (15.exp): New target. (check_DATA): New target. Added 15.exp. 2000-08-05 Per Cederqvist The dummy_aux_item introduced 2000-05-09 was not properly initialized. * src/server/prot-a.c (prot_a_init): Initialize dummy_aux_item.data and aux_item.data. * src/server/internal-connections.c (init_connection): Initialize dummy_aux_item.data. (kill_client): Check dummy_aux_item.data and aux_item.data. 2000-08-04 Per Cederqvist Minor documentation improvement. * doc/lyskomd.texi (Parameters): Clarified the warning about "Never save". Documented the allowed-content-type aux item. * doc/Protocol-A.texi (Predefined Aux-Item Types): Added a draft description of the allowed-content-type aux item. 2000-05-09 David Byers The server could crash when parsing over-long aux-item lists. * src/server/connections.h: Added dummy_aux_item field. * src/server/prot-a-parse.c (prot_a_parse_string): (prot_a_parse_aux_item_list): Use dummy_aux_item in client structure instead of an auto variable. * src/server/connections.c (free_parsed): Clear client->dummy_aux_item. 2000-04-28 Per Cederqvist The data base was saved even when "Never save: true" was used. * src/server/simple-cache.c (cache_sync_all): Return early if param.never_save is set, so that the database won't be saved even at normal server shutdown. * doc/lyskomd.texi (Parameters): Updated the documentation for "Never save". 2000-03-13 Per Cederqvist Large garb-nice values could be truncated. * src/server/text-garb.c (garb_text): Avoid overflow when converting the garb-nice value from days to seconds. (Suspected by Anders Åke Carlsson.) 1999-11-20 Per Cederqvist Fixed a cut-n-paste error in the protocol spec. * doc/Protocol-A.texi (LysKOM Data Types): bcc-recpt is of course a Conf-No, not a Text-No. (Reported by Anders Franzén.) 1999-10-28 David Byers * src/server/text.c (send_async_sub_recipient): Don't send sub-recipient messages for bcc recipients to users who are not members of the bcc recipient. * src/server/testsuite/lyskomd.0/06.exp (shutdown_06): Added test cases to test async messages when adding and removing BCC recipients. 1999-10-27 David Byers * src/server/ramkomd.c (dump_exit_statistics): Free read_config_file (main): Save name of configuration file in read_config_file. Handle WINCH signal (re-read config file.) * src/server/param.h: Added reread_param. Added read_config_file * src/server/server-config.c: Added reread_param. 1999-10-20 Kent Engström Documentation updates w.r.t. e-mail import. * doc/Protocol-A.texi (Predefined Aux-Item Types): Introduced some hints for client authors and clarified the description of some aux-items based on experiences from writing "komimportmail"; changed definition of mx-in-reply-to to specify that is should really be the Message-ID used for threading, regardless of which header line that supplied it. Marked mx-allow-filter and mx-reject-forward obsolete. (komimportmail Aux-Item Types): new node describing the aux-items introduced by this importer. (Importing and Exporting E-Mail): rewrote most of the chapter, using experience from "komimportmail". Removed text about export, as it was rather naive. 1999-10-12 Kent Engström Documentation fix. * doc/lyskomd.texi (Parameters): Moved cross-reference to stop newer makeinfo versions from complaining. 1999-10-09 David Byers * doc/Protocol-A.texi (Client-Specific Aux-Item Types): Added komimportmail to reserved range. * run-support/aux-items.conf: Fixed date validation regexp. 1999-08-13 David Byers * doc/Protocol-A.texi (Predefined Aux-Item Types): Changed "of" to "or" in documentation of content-type. The old wording was incorrect and conveyed the wrong idea. 1999-09-19 Per Cederqvist Prepare for dbck improvement. * src/server/local-to-global.c (add_block_before): New static function. (find_block): Return a pointer to the last block instead of a NULL pointer if a too large local text number is supplied. (l2g_expensive_set): Now fully implemented. * src/server/testsuite/l2g.0/12.exp: New file, that tests l2g_expensive_set. * src/server/testsuite/test-l2g.c (main): Handle l2g_expensive_set. Code cleanup. * src/server/dbck.c (check_misc_any_recipient): New static function. (check_misc_infos): Use it, to avoid repeating the same code inline three times. 1999-09-18 Per Cederqvist Prepare for dbck improvement. * src/server/local-to-global.c (l2g_expensive_set): New function, not yet completely implemented. * src/server/local-to-global.h (l2g_expensive_set): New function. Always install the distributed aux-items.conf. * run-support/Makefile.am (sysconf_DATA): Added aux-items.conf. (EXTRA_DIST): Removed aux-items.conf. (install-data-local): Don't install aux-items.conf here. * README: Warn that aux-items.conf is always installed. 1999-08-18 Per Cederqvist Added aux-item "recommended-conf". * doc/Protocol-A.texi (Predefined Aux-Item Types): The last space and descriptive text in a cross-reference are optional. Added recommended-conf. 1999-07-25 Kent Engström Fixed inconsistent format for aux-item mx-date. * run-support/aux-items.conf: change the validation of aux-item mx-date to the format specified in Protocol-A.texi. * src/server/testsuite/leaks.0/lots-aux-items.conf: Ditto. Experience from writing a mail importer. * doc/Protocol-A.texi: made definition of address aux-items clearer (after a discussion in LysLysKOM), rewrote a lot of the text on mail import. Miscellaneous documentation fixes. * doc/Protocol-A.texi (get-map): this request is indeed obsolete as of version 10 of Protocol A. 1999-07-25 Per Cederqvist * Release 2.0.3. * NEWS: Document version 2.0.3. * configure.in: Set version number to 2.0.3. * versions (SERVER-VERSION): 2.0.3. (SERVER-COMPAT-VERSION): 20003. Looking up the empty name still caused a core dump. * src/server/simple-cache.c (cached_lookup_name): Leaving uninitialized data in the result is almost as bad as following the NULL pointer. The result may contain fewer than no_of_match_info entries -- and now the code attempts to handle it properly. * src/server/testsuite/lyskomd.0/03.exp: Test for name lookup of the empty string when a conference has been deleted. * src/server/testsuite/config/unix.exp (lyskomd_start): Arrange to always test for eof from lyskomd in expect_after, and fail if it is detected. Added missing newlines in restart_kom format strings. * src/server/conference.c (lookup_z_name): Added a missing newline in a restart_kom format string. (do_create_conf): Likewise. 1999-07-24 Per Cederqvist Implemented splitkomdb. This is highly experimental and not yet documented. * src/server/splitkomdb.c: New file. * src/server/Makefile.am (bin_PROGRAMS): Added splitkomdb. (splitkomdb_SOURCES): New variable. * src/server/param.h (struct kom_par): Added backup_dir. * src/server/server-config.c (parameters): Added "Backup export directory". (read_configuration): Handle param.backup_dir. 1999-07-23 Per Cederqvist * Release 2.0.2. * NEWS: Document version 2.0.2. * configure.in: Set version number to 2.0.2. * versions (SERVER-VERSION): 2.0.2. (SERVER-COMPAT-VERSION): 20002. * doc/Protocol-A.texi: This is revision 10.2. (Document Revision History): This is revision 10.2. Looking up the empty name caused a core dump. * src/server/simple-cache.c (cached_lookup_name): Don't follow the NULL pointer. * src/server/conference.c (match_table): Don't declare it here. 1999-07-20 Per Cederqvist * doc/Protocol-A.texi (Predefined Aux-Item Types): Typo fixed -- there is nothing called mx-o. 1999-07-14 Kent Engström Documentation fixes. * doc/Protocol-A.texi (Protocol Requests): set-info sets server information. (set-last-read): last-read is a Local-Text-No. (set-info): Info-Old is returned by get-info-old. (async-logout): Not called async-async-logout. 1999-07-13 Kent Engström Documentation fixes. * doc/Protocol-A.texi: Corrected spelling errors, etc. (Conference Type): reserved1 is now called forbid-secret. (lookup-z-name): use correct call in examples. 1999-07-12 Per Cederqvist * Release 2.0.1. * doc/Protocol-A.texi (Document Revision History): Release date set to 1999-07-12. The performance fix of 1999-07-06 introduced an extra newline in the files. Fix. * src/server/simple-cache.c (copy_file): Don't emit duplicate newlines. Remove false warnings. * src/server/membership.c (access_perm): Fixed the logic error that caused several false warnings to be logged. 1999-07-11 Per Cederqvist Fix the documentation of add-recipient, async-new-recipient and async-sub-recipient. * doc/Protocol-A.texi (Simple Data Types): ENUMERATIONs can be inherited from SELECTIONS. (LysKOM Data Types): Define Info-Type. (add-recipient): The recpt-type argument is an Info-Type, not a complete Misc-Info. (async-new-recipient): The type argument is an Info-Type, not a complete Misc-Info. (async-sub-recipient): Likewise. (Document Revision History): Mention Info-Type. Don't overwrite installations that have lyskomd-backup but no lyskomd-data. * db-crypt/db/Makefile.am (install-data-local): Don't install the database if lyskomd-backup exists. Don't install it if any of the databases exist. Fixed a database error that caused damage to conferences. * src/server/simple-cache.c (save_one_conf): Fixed a serious bug introduced 1997-10-23 when the (as yet unused) FASTSAVE code was written. Changes made to conferences could in some cases be forgotten. Fixed a harmless Y2k bug. * src/server/log.c (kom_logv): Log the year 2000 as "00", not "100". (kom_log): (non-HAVE_VPRINTF version) Likewise. Release preparations. * NEWS: Added an entry for the 2.0.1 release. * versions (SERVER-VERSION): 2.0.1. (SERVER-COMPAT-VERSION): 20001. * configure.in: Set version number to 2.0.1. * README: Recommend running dbck when upgrading from 2.0.0. Regexps are always case sensitive. * doc/Protocol-A.texi: This is revision 10.1 of the specification. (Overview): Protocol versions never have a suffix. (Document Revision History): Wrote entry for 10.1. (Name Expansion): Regexps are case sensitive. (re-lookup-person): Tempus changed. (re-lookup-conf): Tempus changed. (re-z-lookup): Regexps are case sensitive. * src/server/param.h (struct kom_par): Removed the regex_use_collate_table field. * src/server/regex-match.c (lookup_regexp): Never use a translate table. * src/server/server-config.c (parameters): Removed "Regexps use collate table". * doc/lyskomd.texi (Parameters): Removed "Regexps use collate table". * src/server/testsuite/lyskomd.0/03.exp: Don't use "Regexps use collate table". * src/server/testsuite/lyskomd.0/regexp-match-cov.exp: LIkewise. Fixed a minor bug that currently had no effects. * src/server/person.c (create_person_generic): Added a missing call to mark_conference_as_changed. Fixed a buffer overrun. * src/server/aux-items.c (aux_item_trigger_mirror_faq): Fixed a buffer overflow. * src/server/testsuite/lyskomd.0/14.exp: Added a few FAQ aux-item tests. Code cleanup. * src/server/aux-item-def-parse.y (aux_item_def_check_trigger): Added static qualifier. (aux_item_def_check_validate): Likewise. * src/include/kom-types.h (Object_type): Removed the almost unused type PERS_OBJECT_TYPE. * src/server/aux-items.c (find_linked_aux_item_list): Don't test for the non-used PERS_OBJECT_TYPE object type. (mark_linked_object_as_changed): Likewise. 1999-07-08 Per Cederqvist Allow the author of a text to change the recipient type. * src/server/text.c (add_recipient): Allow the text author to change the recipient type. * src/server/testsuite/lyskomd.0/14.exp: New file. * src/server/testsuite/Makefile.am (EXTRA_DIST): Added lyskomd.0/14.exp. 1999-07-07 Kent Engström Documentation fixes. * doc/Protocol-A.texi: corrected some spelling errors; changed cross-references so that new versions of makeinfo will stop complaining; added forbid-secret to the list of conference flags above the table. 1999-07-06 Per Cederqvist Remove a few performance problems. * src/server/membership.c (access_perm_helper): New argument: wanted_access. All callers updated. Avoid calling is_supervisor or is_member if not needed. (get_unread_confs): Minor performance improvement: there is no need to call access_perm if pers_no is the logged-in person. * src/server/simple-cache.c (copy_file): Use a static buffer instead of allocating and releasing a buffer each time this function is called. Remove dead code. * src/server/manipulate.h (IMPL): Unused macro removed. * src/server/dbck-cache.c (IMPL): Unused macro removed. * src/server/ram-parse.c (fparse_conference_2): Remove dead code that depends on the long-obsolete DISKERR symbol. (fparse_conference_0): Likewise. (fparse_person_0): Likewise. (fparse_person_2): Likewise. (fparse_text_stat_2): Likewise. (fparse_text_stat_0): Likewise. 1999-07-05 Per Cederqvist Speed up access_perm, is_supervisor and is_strictly_supervisor by adding a supervisor field to Small_conf, and using it instead of a call to GET_C_STAT. Remove the Conference argument to the above three functions and update all callers. A few stray calls to GET_C_STAT were eliminated in the process. * src/include/kom-types.h (Small_conf): Added a supervisor field. * src/server/cache.h (cached_get_conf_supervisor): New function. * src/server/simple-cache.c (cached_get_conf_supervisor): New function. (mark_conference_as_changed): Copy the supervisor to the entry in small_conf_arr. (init_small_conf): Set supervisor. (setup_small_conf): Set supervisor. * src/server/manipulate.h (access_perm): Removed the victim_c argument. (is_supervisor): Removed the conf_c argument. (is_strictly_supervisor): Removed the conf_c argument. * src/server/membership.c (access_perm_helper): New name for former plain_ol_access_perm. Get rid of call to GET_C_STAT by calling cached_get_conf_type instead. Removed the victim_c argument from all calls to is_supervisor. (plain_ol_fast_access_perm): Removed. (access_perm): Removed the victim_c argument. (copy_public_confs): Removed the victim_c argument from all calls to is_supervisor. Removed the victim_c argument from all calls to access_perm. (sub_member): Likewise. (do_get_members): Likewise. (get_unread_confs): Likewise. (add_member_common): Likewise, and get rid of a call to GET_C_STAT. (do_get_membership): Likewise, and get rid of a call to GET_C_STAT. (set_membership_type): Likewise, and get rid of a call to GET_P_STAT. * src/server/conference.c (do_create_conf): Call mark_conf_as_changed before checking that ACTPERS is allowed to create aux-items in the conference he is creating. (is_supervisor): Removed the conf_c argument. (is_strictly_supervisor): Removed the conf_c argument. Use cached_conf_exists and cached_get_conf_supervisor and eliminate one expensive call to GET_C_STAT. (change_name): Removed the victim_c argument from all calls to access_perm. (delete_conf): Likewise. (lookup_name): Likewise. (lookup_z_name): Likewise. (do_lookup): Likewise. (get_conf_stat_old): Likewise. (get_uconf_stat): Likewise. (get_conf_stat_older): Likewise. (set_presentation): Likewise. (set_etc_motd): Likewise. (set_conf_type): Likewise. (set_garb_nice): Likewise. (set_expire): Likewise. (set_keep_commented): Likewise. (modify_conf_info): Likewise. (set_supervisor): Removed the conf_c argument from all calls to is_strictly_supervisor and is_supervisor. (set_permitted_submitters): Likewise. (set_super_conf): Likewise. * src/server/admin.c (send_message): Removed the victim_c argument from all calls to access_perm. * src/server/person.c (get_person_stat): Removed the victim_c argument from all calls to access_perm. Eliminate one call to GET_C_STAT. (get_person_stat_old): Likewise. (get_created_texts): Removed the victim_c argument from all calls to access_perm. (map_created_texts): Likewise. (do_query_read_texts): Likewise. (set_user_area): Likewise. (set_pers_flags): Likewise. (set_passwd): Removed the victim_c argument from all calls to is_supervisor. * src/server/regex-match.c (lookup_regexp): Removed the victim_c argument from all calls to access_perm. * src/server/send-async.c (async_new_name): Removed the victim_c argument from all calls to access_perm. * src/server/text.c (submit_to): Removed the victim_c argument from all calls to access_perm and is_supervisor. (send_async_sub_recipient): Likewise. (recp_sent_by): Likewise. (filter_secret_info): Likewise. (person_text_read_access): Likewise. (delete_text): Likewise. (send_async_add_recipient): Likewise. (add_recipient): Likewise. (sub_recipient): Likewise. (sub_comment): Likewise. (sub_footnote): Likewise. (get_map): Likewise. (local_to_global): Likewise. * src/server/aux-items.c (aux_item_add_perm): Removed the conf_c argument from all calls to is_strictly_supervisor and is_supervisor. (filter_aux_item_list): Likewise. (check_delete_aux_item_list): Likewise. * src/server/session.c (login_old): Removed the conf_c argument from all calls to is_supervisor. (login): Likewise. (disconnect): Likewise. 1999-07-03 David Byers * src/server/handle-malloc-dump.el (trace-run-programs): Fixed timing problems that caused lyskomd to run before gdb was prepared for it. 1999-07-04 Per Cederqvist Prepare for improving access_perm(). * src/server/membership.c (plain_ol_fast_access_perm): Assert that viewer_conn is never NULL. (access_perm): Log a warning if called with an unexpected wanted_access argument. New convenience check targets. * src/server/Makefile.am (check-lyskomd): New target. (check-leaks): New target. 1999-07-02 David Byers Automatic operation of memory trace analysis: * src/server/ram-smalloc.c: Mention automatic analysis. Update the description on how to do it manually (MEMTRACE=file, ATTACH=yes) * src/server/handle-malloc-dump.el: Added automatic operation in batch mode. Just run -batch and watch the magic happen. 1999-07-02 David Byers Some test cases for name lookup: * src/server/testsuite/Makefile.am (EXTRA_DIST): Added 12 and 13.exp. * src/server/testsuite/lyskomd.0/13.exp: New file. Some name lookup tests. * src/server/testsuite/lyskomd.0/11.exp: Do the right thing when traced allocations are on. 1999-07-01 David Byers * src/server/dbck.c (main): Stole code from test-l2g.c for when traced allocations are on. Eliminate the need to call build_matching_info all the time: * src/server/simple-cache.c (rebuild_matching_info_entry): New function to rebuild a single entry in the matching info table. (find_matching_info_index): New function. (cached_change_name): Use rebuild_matching_info_entry insead of build_matching_info. * src/libraries/libcommon/parser.c (parse): Loop until we see a zero conf-no instead of an empty name. Just skip empty names. * src/server/cache.h (cached_no_of_existing_conferences): Removed extern declaration of build_matching_info. Eliminate conf_table: * src/libraries/libcommon/parser.c: Include kom-types.h so we can include parser.h. * src/server/conference.c: Removed extern declaration of conf_table. Added extern declaration of match_table. (unique_name): Use match_table, not conf_table. * src/server/simple-cache.c: (conf_table): Removed. (build_matching_info): Removed conf_table. (cached_lookup_name): Use match_table instead of conf_table. (free_all_cache): Removed conf_table. * src/libraries/libcommon/parser.h (Matching_info): Added conf_no field. 1999-06-29 David Byers * doc/Protocol-A.texi (sub-comment): Changed sub-comment from obsolete to recommended. 1999-07-01 Per Cederqvist Added the ``wanted_access'' argument to access_perm(), removed fast_access_perm(), and updated all callers. * src/server/manipulate.h (access_perm): New parameter: wanted_access. Never return anything higher than it. All callers updated. (fast_access_perm): Removed. All callers changed to use access_perm instead. * src/server/membership.c: Pass the new argument wanted_access to access_perm(). Use access_perm() instead of fast_access_perm(). (access_perm): Proof-of-concept implementation using plain_ol_access_perm and plain_ol_fast_access_perm. This needs lots of clever speedups. * src/server/admin.c: Pass the new argument wanted_access to access_perm(). Use access_perm() instead of fast_access_perm(). * src/server/conference.c: Likewise. * src/server/person.c: Likewise. * src/server/regex-match.c: Likewise. * src/server/send-async.c: Likewise. * src/server/text.c: Likewise. Turn of async messages during shutdown. * src/server/ramkomd.c (main): Turn of async messages during shutdown. * src/server/testsuite/lyskomd.0/00.exp: Dont expect any async messages during server shutdown. * src/server/testsuite/lyskomd.0/02.exp: Likewise. * src/server/testsuite/lyskomd.0/03.exp: Likewise. * src/server/testsuite/lyskomd.0/08.exp: Likewise. 1999-06-30 Per Cederqvist * README: Talk a little about the config file. Broken typo fix fixed. * NEWS: Changed "the near feature" to "a future release". 1999-06-28 Per Cederqvist Fixed a bug that causes created_texts to contain some deleted texts. * src/server/text.c (do_delete_text): Don't forget to call mark_person_as_changed -- the authors' list of created texts must be updated. * src/server/testsuite/lyskomd.0/12.exp: Detect the above bug. * src/server/testsuite/config/unix.exp (dbck_run): New proc. (lyskomd_death): Call dbck_run to check the database after each shutdown. 1999-06-27 Per Cederqvist * Release 2.0.0. Port to places such as AIX 4.2 where char is an unsigned type. * src/server/dbck.c (main): Use an int to store the return value from getopt_long. * src/server/dbck-cache.c (init_cache): Use an int to store the return value from getc. Port the test suite to OSF 3.0. * src/server/testsuite/config/unix.exp (stty_init): Quote the ^ character. Some shells interpret it as a pipe. * README: Mention that Python is needed by the test suite. Specify more of the behavior of get-unread-confs. * doc/Protocol-A.texi (get-unread-confs): Specify the order of the returned conference numbers. 1999-06-26 Per Cederqvist Port the makefiles and test suite to FreeBSD. * src/server/testsuite/Makefile.am (RM): Set it. * src/server/Makefile.am (RM): Set it. * doc/Makefile.am (RM): Set it. * src/server/testsuite/config/unix.exp (unanchored_expect): Don't leave an unparsed space behind when an unexpected output appears before a prompt. * src/server/testsuite/lyskomd.0/01.exp: Don't be confused about the newline emitted in the collate table. * src/server/testsuite/lyskomd.0/03.exp: Likewise. * src/server/testsuite/config/unix.exp (stty_init): Remove "-ocrnl" which isn't portable to FreeBSD. Port the test suite to HP/UX. * src/server/testsuite/config/unix.exp (stty_init): Add "-isig erase ^- kill ^- werase ^-". Port the test suite to non-gcc compilers. * src/server/testsuite/test-l2g.c (MAXMAPS): Use #define instead of "const int" so that the symbol can portably be used as an array size. (LINSIZE): Likewise. (ARGS): Likewise. 1999-06-26 David Byers * src/include/kom-types.h (Membership_type): Changed all fields from Bool to unsigned int. * src/server/aux-items.c: Removed support for precompiled aux items. It was not currently used, and caused compilation errors under HP/UX. 1999-06-26 Per Cederqvist Fix coding error. * src/server/aux-items.c (aux_item_add_perm): Don't use find_aux_item_definition to set def if def is already set. Remove lint found by HP/UX c89. * src/server/ram-parse.c (fparse_aux_item_link): Missing semicolon added. * src/server/ram-output.c (foutput_aux_item_link): Missing semicolon added. (foutput_mark_list): Declare the function static in all declarations, not only some. * src/server/aux-items.h (aux_item_validators): This is static, so remove it form the header file. (aux_item_triggers): Likewise. * src/server/aux-items.c (mark_linked_object_as_changed): Missing semicolon added. * src/server/session.c (create_oldstyle_username): Remove needless casts. (login_old): Likewise. (login): Likewise. * HACKING: We use bison 1.27. 1.25 had problems with alloca under HP/UX. 1999-06-26 David Byers Send new-membership only for new memberships. * doc/Protocol-A.texi (async-new-membership): Remove documentation that says this message is sent when a membership is reprioritized. * src/server/testsuite/lyskomd.0/06.exp (shutdown_06): Don't expect new-membership when membership is changed. * src/server/membership.c (add_member_common): Only send new-membership for new memberships, not changed memberships. 1999-06-25 Per Cederqvist "make check" failed if the source tree was read-only. * src/server/testsuite/config/unix.exp (lyskomd_start): Use chmod to make sure that the database is writable even if it is copied from a read-only tree. "make -j install" could fail. * run-support/Makefile.am (install-data-local): Depend on installdirs. * db-crypt/db/Makefile.am (install-data-local): Depend on installdirs. Port to SunOS 4.1.1. * src/server/aux-item-def-scan.l: Include . * configure.in: Check for sig_atomic_t. * acconfig.h: Added sig_atomic_t. Release administrativa. * scripts/lyskomd-copyrights: Don't attempt to update copyright notices in TeX temporary files. Documentation fixes. * TODO: No showstoppers left. * NEWS: Several minor modifications. * README: Spelling errors fixed. * doc/Protocol-A.texi (mark-text-old): Spelling error fixed. (get-text-stat-old): Talk about bcc-recpt. (Protocol Requests): Warn that obsolete calls perform compatibility magic. Include the number of the protocol request in the printed heading of the corresponding section. (set-pers-flags): Fix sectioning error. (get-unread-confs): Clarify that passive memberships are never returned. Performance fix. * src/server/internal-connections.c: Turn off defensive checks in this file. They cost too much CPU. Release administrativa. * doc/Protocol-A.texi (Document Revision History): Update the release date for revision 10.0. * NEWS: Sort the news. The test suite failed when compiled outside the source directory. * src/server/testsuite/leaks.0/leaks10.exp: startup_leaks wants a relative path to the aux-items.conf file. * src/server/testsuite/leaks.0/leaks99.exp: Likewise. 1999-06-24 Per Cederqvist Fix messages created by dbck. * src/server/dbck.c (garb_text_file): Don't log the message "Ready."; the caller also logs it. Add trailing newline in format string to kom_log in the following functions: * src/server/regex-match.c (lookup_regexp): * src/server/ramkomd.c (sighandler_usr2): * src/server/prot-a-parse.c (prot_a_parse_num_list): (prot_a_parse_string): (prot_a_parse_aux_item_list): (prot_a_parse_misc_info_list): * src/server/person.c (do_unmark_text): (create_person_generic): * src/server/membership.c (mark_as_read): (set_membership_type): * src/server/dbck.c (main): * src/server/dbck-cache.c (cached_flush_text): * src/server/connections.c (call_function): (toploop): * src/server/conference.c (do_create_conf): * src/server/aux-items.c (find_linked_aux_item_list): (aux_item_validate): 1999-06-24 David Byers * src/server/aux-items.c (aux_item_validate): Do not print the regexp that failed to compile since it is gone by this time. 1999-06-23 Per Cederqvist The default language is now selectable at configure time. * README: Mention --with-language=sv. * configure.in: Handle --with-language=sv. * db-crypt/db/Makefile.am (LANGUAGE_SUFFIX): New variable. (EXTRA_DIST): Added lyskomd-data-en. (install-data-local): Install lyskomd-data-en or lyskomd-data, depending on LANGUAGE_SUFFIX. * db-crypt/db/lyskomd-data-en: New file. Remove the unused file tmp-limits.h. * src/server/Makefile.am (lyskomd_SOURCES): Removed tmp-limits.h. * src/server/tmp-limits.h: Unused file removed. * NEWS: More items added. This should now be fairly complete, but it may need restructuring. 1999-06-23 David Byers * src/server/dbck.c (init_person_scratch): Initialize person scratchpad entries to NULL. 1999-06-21 Per Cederqvist Fix the test suite. * src/server/testsuite/lyskomd.0/11.exp: Updated to match the log messages currently sent by lockdb.c. Don't send too many async-logout messages. * src/server/connections.c (logout_client): Back out the change made 1999-01-16; no longer send async-logout if the session is not logged in. * src/server/testsuite/lyskomd.0/07.exp: Don't expect async-logout when sessions are disconnected. * doc/Protocol-A.texi (async-logout): This message is not necessarily sent when a session disconnects and nobody is logged in. 1999-06-20 Per Cederqvist Release fixes. * HACKING: Added a missing call to ./configure. * NEWS: Updated the release date. Improve log messages regarding database locking. * src/server/lockdb.c (lock_db): Clarify log messages. * src/server/ramkomd.c (initialize): Write an "exiting" message when the lock cannot be obtained. Fix parameters "Jubel" and "Ident-authentication". * src/server/server-config.c (parameters): Removed duplicate "Ident-authentication". * src/server/standalone.c (register_jubel): Don't call abort -- this gets called from dbck if the config file contains a Jubel. 1999-06-19 Per Cederqvist Save 5 items (configurable) per call. * src/server/param.h (struct kom_par): Added saved_items_per_call. * src/server/disk-end-of-atomic.c (end_of_atomic): Handle param.saved_items_per_call. * doc/lyskomd.texi (Parameters): Documented "Saved items per call". * src/server/server-config.c (parameters): Added "Saved items per call". (read_configuration): Check that param.saved_items_per_call is at least 1. 1999-06-14 Per Cederqvist Track name change of 556450-2507. * doc/lyskomd.texi (Overview): Signum Support has a new name: Cendio Systems. 1999-06-13 Per Cederqvist Allow at most 128 aux_items of at most 16384 bytes each to be added at a single time. * src/server/server-config.c (parameters): Added "Max aux_item length". Changed default of "Max aux_items added per call" to 128. * src/server/prot-a-parse.c (prot_a_parse_aux_item): Use param.aux_len instead fo param.text_len as the limit for the aux-item size. * src/server/param.h (struct kom_par): Added aux_len. * doc/lyskomd.texi (Parameters): Document "Max aux_items added per call". Lowered the default from "Max aux_items added per call". 1999-06-13 David Byers * src/server/testsuite/lyskomd.0/03.exp: Fix test cases for change in aux_item_link_items below. * src/server/testsuite/lyskomd.0/aux-items-cov.exp: Fix test cases for change in aux_item_link_items below. * src/server/aux-items.c (aux_item_link_items): Creator of linked aux item is now the creator of the source item. This gives the creator of the source item power over the linked item. 1999-06-11 David Byers * src/server/aux-items.c: Cleared up comment for undelete_aux_item_list. 1999-06-05 David Byers * src/server/text-garb.c: Always include setjmp.h 1999-06-05 Per Cederqvist Test lock files. * src/server/testsuite/lyskomd.0/11.exp: New file. * src/server/testsuite/Makefile.am (EXTRA_DIST): Added lyskomd.0/11.exp. * src/server/Makefile.am (all-recursive check-recursive): Depend on dbck. * src/server/lockdb.c (lock_db): Log a message when a stale lock is removed. * src/server/dbck.c (main): Don't die until a character has been read if -d is used. * src/server/ramkomd.c (initialize): Don't die until a character has been read if -d is used. text-garb.c failed to compile unless --with-debug-calls was used. * src/server/text-garb.c: Always include , since it is needed by connections.h. strdup() is no longer used, so a replacement function is not needed. * configure.in: Commented out AC_REPLACE_FUNCS(strdup). * src/libraries/libansi/Makefile.am (EXTRA_DIST): Added strdup.c. 1999-06-05 David Byers * regexp-match-cov.exp: New test case. * src/server/regex-match.c (lookup_regexp): Don't use strdup to copy the collate table. * src/server/text.c (modify_text_info): Check for read access on text. * src/server/conference.c (modify_conf_info): Check for secret confs. 1999-05-31 David Byers * src/server/text.c (add_comment): Moved access checks to avoid leaking information. (add_footnote): Same here. * src/server/membership.c (set_membership_type): Move permission checks to avoid leaking information. * doc/lyskomd.texi (Adding a New Protocol Request): Added notes on CHK_CONNECTION, CHK_LOGIN and how to avoid leaking secret information. * src/server/text.c (add_recipient): Moved GET_X_STAT and permission checks around to avoid leaking secret information. * src/server/text-garb.c (start_garb): Same here. * src/server/debug.c (get_memory_info): Call CHK_CONNECTION. (backdate_text): Same here. * src/server/aux-items.c (query_predefined_aux_items): Call CHK_CONNECTION. * src/server/admin.c (get_info_old): Call CHK_CONNECTION. (get_version_info): Same here. (set_info): Same here. (set_motd_of_lyskom): Same here. (sync_kom): Same here. * src/server/session.c (get_time): Call CHK_CONNECTION. (who_is_on_old): Same here. * src/server/text.c (local_to_global): Moved CHK_CONNECTION to very start of function. (get_last_text): Call CHK_CONNECTION. * src/server/person.c (set_priv_bits): Call CHK_CONNECTION. * src/server/session.c (get_client_version): Call CHK_CONNECTION. (get_client_name): Same here. (get_session_info): Same here. (get_session_info_ident): Same here. (get_static_session_info): Same here. 1999-06-04 Per Cederqvist Clean up file inclusion. Avoid including files from .h files. Avoid underscores in dubious places. * src/server/admin.c: Don't include . * src/server/conf-file.c: Likewise. * src/server/conference.c: Likewise. * src/server/connections.c: Likewise. * src/server/dbck-cache.c: Likewise. * src/server/internal-connections.c: Likewise. * src/server/membership.c: Likewise. * src/server/memory.c: Likewise. * src/server/person.c: Likewise. * src/server/prot-a-parse.c: Likewise. * src/server/ram-output.c: Likewise. * src/server/ram-parse.c: Likewise. * src/server/ramkomd.c: Likewise. * src/server/regex-match.c: Likewise. * src/server/rfc931.c: Likewise. * src/server/send-async.c: Likewise. * src/server/server-config.c: Likewise. * src/server/session.c: Likewise. * src/server/simple-cache.c: Likewise. * src/server/text-garb.c: Likewise. * src/server/text.c: Likewise. * src/server/testsuite/test-l2g.c: Include "kom-types.h". * src/server/local-to-global.h: Don't include "kom-types.h". * src/server/log.h: Don't include . Don't declare kom_logv. Don't use leading underscores or double underscores in symbols we define. * src/server/log.c (kom_logv): Now static. * src/include/compiler.h: Don't use leading underscores or double underscores in symbols we define. * src/include/kom-errno.h: Likewise. * src/include/kom-types.h: Likewise. * src/include/misc-types.h: Likewise. * src/include/services.h: Likewise. Distribute new test suite files. * src/server/testsuite/Makefile.am (EXTRA_DIST): Added lyskomd.0/09.exp and lyskomd.0/10.exp. Some systems lack strdup. * configure.in: Added AC_REPLACE_FUNCS(strdup). * src/libraries/libansi/strdup.c (strdup): Replacement implementation. 1999-05-31 Per Cederqvist Fixed typo in the test suite. * src/server/testsuite/lyskomd.0/09.exp: Don't mix the timestamps for texts 5 and 6. 1999-05-31 David Byers * src/server/server-config.c: Removed duplicate regexps use collate table. * src/server/manipulate.h (CHK_LOGIN): Check for NULL active_connection. (ENA): Survive a NULL active_connection. (HAVE_PRIV): Take a Person argument. 1999-05-30 David Byers * src/server/text-garb.c (garb_text): Reset deleted_texts after sending the debug message. 1999-05-30 David Byers * src/server/testsuite/lyskomd.0/09.exp (1015): Data sent to client 2 contained secret recipient. Fixed. * src/server/testsuite/lyskomd.0/05.exp: Fixed added_by field in Membership and Member * src/server/testsuite/lyskomd.0/03.exp: (1349,1350, 1351, 2001, 2006): Fixed added_by field in Membership and Member * src/server/testsuite/lyskomd.0/01.exp: (1116): Fixed added_by field in Membership * src/server/regex-match.c (lookup_regexp): Copy the collate table before putting it into the pattern buffer. * src/server/testsuite/lyskomd.0/00.exp (1038): Person 6 added himself to his letterbox. * src/server/membership.c (do_add_member): Take added_by as an argument. (add_member_common): Call do_add_member with explicit added_by. * src/server/person.c (create_person_generic): The person adding the mailbox membership is the same as the creator of the person. Fixed problems related to permission checking * src/server/membership.c (fast_access_perm): Take a connection argument instead of a person and pers_stat combo. (access_perm): Same here. (copy_public_confs): Same here. * src/server/text.c (ok_to_create_next_text): Same here. * src/server/regex-match.c (lookup_regexp): Test for param.regex_use_collate_table was inverted. (lookup_regexp): Added connection argument. * src/server/text.c (filter_secret_info): Take a connection argument instead of viewer and viewer_p (send_async_deleted_text): Call filter_secret_info with connection argument. (get_text_stat_old): Same here. (get_text_stat): Same here. (send_async_new_text_old): Same here. (send_async_new_text): Same here. (person_text_read_access): Check that active_connection is set before attempting to use it. (text_read_access): Take a connection as an argument. * src/server/conference.c (get_conf_stat): Call filter_aux_item_list with active_connection instead of ACTPERS and ACT_P. * src/server/admin.c (get_info): Call filter_aux_item_list with active_connection instead of ACTPERS and ACT_P. * src/server/session.c (leave_conf): New parameter for connection to remove dependency on active_connection. * src/server/internal-connections.c (get_conn_by_number): Defensive check on active_connection. Restart server if active_connection is unset and no session number is specified since callers of this function expect to get something sensible out of it. * src/server/manipulate.h (CHK_CONNECTION): New macro. Call this at the head of every RPC function. * src/server/admin.c (shutdown_kom): Signal internal error if we don't have an active connection. 1999-05-30 Per Cederqvist Improve the test suite. * src/server/testsuite/lyskomd.0/09.exp: Added async messages sent by the garb when it deletes text 2, 4 and 6. This is untested and may break. 1999-05-30 Per Cederqvist Don't send async-sub-recipient messages when texts are deleted. * src/server/text.c (perform_subtraction): New static function, extracted from do_sub_recpt. Only send async-sub-recipient if the new argument want_async is true. (do_sub_recpt): Code simplified by creation of perform_subtraction(). New argument: want_async (see above). (do_delete_text): Tell do_sub_recpt that we don't want any async-sub-recipient messages. (sub_recipient): Tell do_sub_recpt to send async-sub-recipient messages. * src/server/testsuite/lyskomd.0/09.exp: async-sub-recipient messages are no longer erroneously sent. Comment out the code that causes a core dump. * src/server/testsuite/lyskomd.0/send-async-cov.exp: Likewise. * src/server/testsuite/lyskomd.0/06.exp: async-sub-recipient messages are no longer erroneously sent. Added a test case that corresponds to the bug found 1999-05-24. * src/server/testsuite/lyskomd.0/09.exp: This test now causes lyskomd to dump core while garbing texts. Async-sub-recipient was not always sent when it should be, and it contained bogus data. * src/server/testsuite/lyskomd.0/10.exp: Check async-sub-recipient. * src/server/text.c (do_sub_recpt): Send async-sub-recipient immediately before removing the recipient, so that we know where to send it. As a side effect the type is now read from the proper misc-info group. (send_async_deleted_text): Use #if 0 instead of comments to comment out code. * src/server/testsuite/lyskomd.0/send-async-cov.exp: Handle async-sub-recipient messages that are (probably erroneously) sent. * src/server/testsuite/lyskomd.0/06.exp: Handle async-sub-recipient messages that are (probably erroneously) sent. New debug call: start-garb. New debug async: garb-ended. * src/server/testsuite/lyskomd.0/09.exp: New tests. * src/server/text-garb.c (last_checked): Moved to file-level scope, so that start_garb can access it. (last_start): Likewise. (garb_text): Send async-garb-ended when the garb ends, but only if DEBUG_CALLS is defined. (start_garb): New function, only present when DEBUG_CALLS is defined. * src/server/session.c (accept_async): Handle ay_garb_ended if DEBUG_CALLS is defined. * src/server/send-async.c (async_garb_ended): New function, only present when DEBUG_CALLS is defined. * src/server/send-async.h: Likewise. * src/server/prot-a-send-async.c (prot_a_async_garb_ended): New function, only present when DEBUG_CALLS is defined. * src/server/prot-a-send-async.h: Likewise. * src/server/fncdef.txt: New debug call: start_garb. * src/server/async.h (Async): New debug async: ay_garb_ended. * src/include/services.h (start_garb): New debug call. Cut-n-paste error in Protocol-A.texi fixed. * doc/Protocol-A.texi (async-sub-recipient): The explanation talked about "the new recipient". 1999-05-24 Per Cederqvist Removed a newline in the log. * src/server/simple-cache.c (init_cache): Removed an extra newline in the log output. Don't lose data when converting the database. * src/server/ram-output.c (foutput_membership): Call foutput_membership_0 for output format 1. (foutput_membership_list): Call foutput_membership_list_0 for output format 1. * src/server/ram-output.c (foutput_text_list): Don't get stuck in an eternal loop. * src/server/dbck-cache.c (cache_sync_all): Output format 2 is known. * src/server/ram-parse.c (fparse_text_list): Set first_appendable_key when reading a Local_to_global from an old-style empty text-list. * src/server/local-to-global.c (l2g_set_first_appendable_key): New function. * src/server/local-to-global.h: Likewise. 1999-05-24 David Byers * 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 Update the distributed config file. * run-support/config: Removed the "Mux port" line. Update the help message of dbck. * src/server/dbck.c (give_help): File format 2 is supported. Port to Solaris. * src/server/lockdb.c: Include . Fix the anti-timetravel change. * src/server/dbck-cache.c (sync_output_header): Output the supplied state instead of hardcoding it to DIRTY. Added a missing const. Added copyright header to the following files. * src/server/testsuite/config/leaks.exp: * src/server/testsuite/config/prot-a.exp: * src/server/testsuite/l2g.0/00.exp: * src/server/testsuite/l2g.0/01.exp: * src/server/testsuite/l2g.0/02.exp: * src/server/testsuite/l2g.0/03.exp: * src/server/testsuite/l2g.0/04.exp: * src/server/testsuite/l2g.0/05.exp: * src/server/testsuite/l2g.0/06.exp: * src/server/testsuite/l2g.0/07.exp: * src/server/testsuite/l2g.0/08.exp: * src/server/testsuite/l2g.0/09.exp: * src/server/testsuite/l2g.0/10.exp: * src/server/testsuite/l2g.0/11.exp: * src/server/testsuite/leaks.0/leaks00.exp: * src/server/testsuite/leaks.0/leaks01.exp: * src/server/testsuite/leaks.0/leaks02.exp: * src/server/testsuite/leaks.0/leaks03.exp: * src/server/testsuite/leaks.0/leaks04.exp: * src/server/testsuite/leaks.0/leaks05.exp: * src/server/testsuite/leaks.0/leaks06.exp: * src/server/testsuite/leaks.0/leaks07.exp: * src/server/testsuite/leaks.0/leaks08.exp: * src/server/testsuite/leaks.0/leaks09.exp: * src/server/testsuite/leaks.0/leaks10.exp: * src/server/testsuite/leaks.0/leaks99.exp: * src/server/testsuite/lyskomd.0/00.exp: * src/server/testsuite/lyskomd.0/01.exp: * src/server/testsuite/lyskomd.0/02.exp: * src/server/testsuite/lyskomd.0/03.exp: * src/server/testsuite/lyskomd.0/04.exp: * src/server/testsuite/lyskomd.0/05.exp: * src/server/testsuite/lyskomd.0/06.exp: * src/server/testsuite/lyskomd.0/07.exp: * src/server/testsuite/lyskomd.0/08.exp: * src/server/testsuite/lyskomd.0/admin-cov.exp: * src/server/testsuite/lyskomd.0/aux-items-cov.exp: * src/server/testsuite/lyskomd.0/aux-items.conf: * src/server/testsuite/lyskomd.0/aux-items.cov: * src/server/testsuite/lyskomd.0/broken-aux-items.conf: * src/server/testsuite/lyskomd.0/cache-node-cov.exp: * src/server/testsuite/lyskomd.0/conf-file-cov.exp: * src/server/testsuite/lyskomd.0/conference-cov.exp: * src/server/testsuite/lyskomd.0/connections-cov.exp: * src/server/testsuite/lyskomd.0/disk-end-of-atomic-cov.exp: * src/server/testsuite/lyskomd.0/membership-cov.exp: * src/server/testsuite/lyskomd.0/null.exp: * src/server/testsuite/lyskomd.0/person-cov.exp: * src/server/testsuite/lyskomd.0/prot-a-parse-cov.exp: * src/server/testsuite/lyskomd.0/prot-a-send-async-cov.exp: * src/server/testsuite/lyskomd.0/send-async-cov.exp: * src/server/testsuite/lyskomd.0/session-cov.exp: * src/server/testsuite/lyskomd.0/text-cov.exp: * src/server/testsuite/tcpconnect.py: * src/server/testsuite/test-l2g.c: Release administrativa. * NEWS: Set the release date to 1999-05-31. * configure.in: Set version number to 2.0.0. * versions (SERVER-VERSION): 2.0.0. (SERVER-COMPAT-VERSION): 20000. Cleanup. * doc/prot-A-english.txt: File removed. * src/server/To-do: File removed. * src/server/Makefile.am (EXTRA_DIST): Removed To-do. Update copyright notices. * : update the year in the copyright notice. * scripts/update-copyright: Handle yearspans. * scripts/lyskomd-copyrights: Updated the list of files to ignore. Documentation fixes. * doc/Protocol-A.texi (get-collate-table): Document what short collate tables means. * doc/lyskomd.texi (Administration): komrunning now takes the arguments "start" and "stop". * HACKING: Mention the versions of bison and flex. * README: Updated for the release. Work around automake bugs. * src/server/testsuite/Makefile.am (noinst_DATA): Removed the "nodist_" prefix, which was apparently broken. * doc/Makefile.am (dist_noinst_DATA): Removed to work around an automake bug. For now, the check for tabs is not performed automatically. 1999-05-23 Per Cederqvist Documentation fixes. * doc/Protocol-A.texi (Top): Updated for release. (What do I have unread): @code{@xref{}} and @code{@ref{}} don't work, so don't use the construct. --with-traced-allocations broke the test suite. * src/server/testsuite/config/unix.exp (l2g_start): Handle TRACED_ALLOCATIONS. * src/server/testsuite/test-l2g.c (main): Handle TRACED_ALLOCATIONS. * src/server/ram-smalloc.c: Comment updated. Update the protocol revision. * src/server/fncdef.txt: Whitespace fix. * doc/Protocol-A.texi: Removed all up, next and prev pointers once again. (Document Revision History): Specify tomorrow as release date. (Protocol Version History): Update the entry for protocol version 10. The status of 59=create-anonymous-text-old was changed to Obsolete in protocol version 10, not version 9. (Protocol Requests): Mark experimental calls with an "e". (add-member-old): Typo fixed. (unmark-text): This was introduced in protocol version 6, not 4. (set-expire): Change status to Experimental. (set-keep-commented): Change status to Experimental. (set-pers-flags): Fix markup error. 1999-05-22 David Byers Timestamp the saved database and refuse to start if the server travels backwards through time: * doc/lyskomd.texi (Version 2): Documented new header format. * db-crypt/db/lyskomd-data: Added timestamp * src/server/dbck-cache.c (cache_sync_all): Handle output format 2. (sync_output_header): New function. (cache_sync_all): Use sync_output_header to output file header. * src/server/simple-cache.c (pre_sync): Use sync_output_header. (sync_output_header): New function outputs file header and timestamp. (save_one_text): Use it. (init_cache): Check the timestamp on the database before loading. * src/server/connections.c (toploop): Log a warning if time starts moving backwards. Documentation fixes: * doc/Protocol-A.texi (get-membership): Fixed FIXME. * doc/lyskomd.texi: Fixed misplaced @code and @i markup. * doc/Protocol-A.texi: Fixed misplaced @code and @samp markup. 1999-05-23 Per Cederqvist Port to automake 1.4a. * src/server/testsuite/Makefile.am (check_PROGRAMS): Don't bother building test-l2g until "make check". (nodist_noinst_DATA): Dont' distribute site.exp and .gdbinit. 1999-05-23 Per Cederqvist Disallow tabs in lyskomd.texi. * doc/Makefile.am (dist_noinst_DATA): New target, containing Protocol-A.notab and lyskomd.notab. (MOSTLYCLEANFILES): Added Protocol-A.notab and lyskomd.notab. (protocol-a.info): Remove the tab-checking code. (SUFFIXES): Added .texi .notab. (.texi.notab): New rule, that checks that no tabs exist in Texinfo files. Get rid of the file local-to-global.doc. Various fixes to lyskomd.texi. * doc/Makefile.am (EXTRA_DIST): Remove local-to-global.doc. * doc/local-to-global.doc: File removed; contents moved into lyskomd.texi. * doc/lyskomd.texi: Removed all up, next and prev pointers once again. Untabify. Remove trailing whitespace from lines. (Overview): Added a missing "General" to the name of the license. Don't talk about my private future plans. (Installation): Refer to README. (DBCK Bugs): don't say that dbck doesn't lock the database; it does. (Function Templates for prot-a-send-async.c): Improve the markup. (Configuration Options): Mention --with-traced-allocations. (local-to-global): New node. Not yet translated. 1999-05-22 Per Cederqvist Translated and updated the release instructions. * HACKING: New file. This contains an updated translation of SERVER-RELEASE and information about the versions of various tools that was used to create the release. * SERVER-RELEASE: Removed. * Makefile.am (EXTRA_DIST): Added HACKING. Removed SERVER-RELEASE. 1999-05-21 Per Cederqvist "make dist" fixes. * src/server/Makefile.am (lyskomd_SOURCES): Added server-time.h * src/server/testsuite/Makefile.am (EXTRA_DIST): Changed leaks.0/no-aux-items.exp and leaks.0/lots-aux-items.exp to leaks.0/no-aux-items.conf and leaks.0/lots-aux-items.conf. * doc/Makefile.am (EXTRA_DIST): Removed ADMINISTRATION and misc_items. Get rid of the very obsolete SERVER and CLIENT macros. * src/server/testsuite/Makefile.am (INCLUDES): Removed -DSERVER. * src/server/Makefile.am (INCLUDES): Removed -DSERVER. * src/libraries/libcommon/parser.c: Don't use SERVER. * src/libraries/libcommon/Makefile.am (INCLUDES): Removed -DSERVER. * src/include/services.h: Don't use SERVER or CLIENT. Fix some indentation. (KOM_): Macro removed. All users updated. * src/include/kom-types.h: Don't use SERVER or CLIENT. Fix some indentation. * configure.in: Don't define SERVER. * acconfig.h (PROTOTYPES): Removed. (SERVER): Removed. (VERSION): Removed. Remove all gcov files in "make mostlyclean". * src/server/testsuite/Makefile.am (MOSTLYCLEANFILES): Added "*.da", "*.bb", "*.gcov" and "*.bbg". * src/libraries/libmisc/Makefile.am: Likewise. * src/libraries/libcommon/Makefile.am: Likewise. 1999-05-21 David Byers * doc/lyskomd.texi (Adding New Input Types): Document the fact that you have to free data in prot_a_destruct as well. * src/server/prot-a.c (prot_a_destruct): Free num_lists in the client structure. 1999-05-21 Per Cederqvist Don't lock the database when dbck is running in read-only mode. * src/server/dbck.c (iflag): Now static. (rflag): Now static. (gflag): Now static. (sflag): Now static. (force_output): Now static. (unset_change_name_is_error): Now static. (dump_text_numbers): Now static. (main): Only lock the database when dbck might want to change it. Added a missing break statement. Mark the database as modified if any of --pres-pres-conf, --conf-pres-conf, --motd-conf, --motd-of-kom or --kom-news-conf is used. 1999-05-21 David Byers * src/server/testsuite/Makefile.am (EXTRA_DIST): Added null.exp * doc/lyskomd.texi: Merged lyskomdb.texi into this document. * src/server/server-config.c: Unassign the lockfile name. * doc/Makefile.am (info_TEXINFOS): Removed deleted files. (EXTRA_DIST): Removed deleted files from EXTRA_DIST. * src/server/conf-file.c (unassign_string): New function. * src/server/conf-file.h (parameter): Added a free function. * src/server/simple-cache.c (free_all_cache): Free the small_conf_arr. * src/server/ramkomd.c (dump_exit_statistics): Moved remaining frees from main to here. 1999-05-20 David Byers * src/server/testsuite/config/unix.exp: You can now supply MEMTRACE, ATTACH and EFENCE algorithms on the runtest command line. * src/server/testsuite/Makefile.am (EXTRA_DIST): Added new leak tests to EXTRA_DIST. Eliminated memory leaks in aux-item definition parser * src/server/aux-items.c (free_aux_item_definitions): Free each individual aux item definition. Another memory leak down the drain. * src/server/aux-item-def-parse.y: Free the string of an ID parameter when we see one. Another memory leak bites the dust. * src/server/aux-items.c (aux_item_definition_cache_regexp): Plug a really minor (constant size) memory leak. * src/server/aux-item-def-parse.y: Use string_free to free stuff allocated with s_crea_c_str. * src/server/aux-items.c (aux_item_trigger_link_item): Use string_free to free string allocated with s_crea_c_str. (free_aux_item_definitions): Same here. 1999-05-19 David Byers * src/server/prot-a-parse.c (prot_a_parse_aux_item_list): Clear the dummy aux item after parsing it. Memory leak plugged. * src/server/memory.c (clear_aux_item): New function. (free_aux_item_list): Use it. * src/server/prot-a-parse.c (prot_a_parse_num_list): Handle truncation so protocol errors during truncation will not break the server. (prot_a_hunt_nl): Same here. (prot_a_parse_aux_item_list): Same here. * src/server/prot-a.c (prot_a_init): Initialize array_parse_parsed_length * src/server/internal-connections.c (init_connection): Initialize array_parse_parsed_length * src/server/connections.c (free_parsed): Initialize array_parse_parsed_length. * src/server/connections.h (Connection): Added array_parse_parsed_length * src/server/fncdef.txt: Truncate strings in set_client_version to client_data_len. * src/server/ramkomd.c (main): Free aux-item definitions on exit. * src/server/aux-items.c (free_aux_item_definitions): New function to free all data associated with aux-item defs. * src/server/ramkomd.c (main): Free aux-item definition. 1999-05-18 David Byers * src/server/prot-a-parse.c (prot_a_parse_aux_item_flags): Handle variable-length bitfields. * src/server/memory.c (init_aux_item_flags): New function. * src/server/prot-a-parse.c (prot_a_parse_priv_bits): Handle variable-length bitfields. (prot_a_parse_membership_type): Same here. (prot_a_parse_conf_type): Same here. * src/server/memory.c (init_membership_type): New function. * doc/Protocol-A.texi (set-client-version): Added list of known clients. * ChangeLog.1: Inserted doc/LOGG * doc/LOGG: Added to ChangeLog.1 * src/server/conference.c (set_supervisor): Use is_strictly_supervisor instead of is_supervisor. 1999-05-21 Per Cederqvist Lock the database file with an explicit lock file. * src/server/dbck.c (main): Lock and unlock the database. * src/server/ramkomd.c (init_data_base): Log the name of the lock file. (initialize): Lock the database before opening it. (main): Unlock the database. * src/server/server-config.c (parameters): Added "Lock file". (read_configuration): Handle param.lockfile_name. * src/server/param.h (struct kom_par): Added lockfile_name. * src/server/Makefile.am (lyskomd_SOURCES): Added lockdb.h and lockdb.c. (DBCK): Likewise. * src/server/lockdb.c, src/server/lockdb.h: New files. (lock_db): New function. (unlock_db): New function. * doc/lyskomd.texi (Parameters): Document "Lock file:". 1999-05-20 Per Cederqvist Clean up the framework for hunting memory leaks. * src/server/ram-smalloc.c: Document --with-traced-allocations. * src/server/realloc.gdb: File removed. * src/server/malloc.gdb: File removed. * src/server/free.gdb: File removed. * src/server/Makefile.am (EXTRA_DIST): Removed free.gdb, malloc.gdb and realloc.gdb. 1999-05-20 Per Cederqvist dbck failed to handle bcc_recpts. * src/libraries/libcommon/misc-parser.c (parse_next_misc): Handle bcc_recpt. Fix usage of the COMPILE_CHECKS macro. Fix usage of the COMPILE_CHECKS macro. * src/server/text.c (find_recipient): Fix usage of the COMPILE_CHECKS macro. (is_member_in_recpt): Likewise. (do_delete_misc): Likewise. (do_sub_recpt): Likewise. (sender): Likewise. (is_sender): Likewise. (is_comm_sender): Likewise. (skip_recp): Likewise. (recp_sent_by): Likewise. (filter_secret_info): Likewise. (do_delete_text): Likewise. (check_double_subm): Likewise. (check_double_comm): Likewise. (create_text_add_miscs): Likewise. * src/server/text-garb.c (garb_text): Fix usage of the COMPILE_CHECKS macro. * src/server/ram-output.c (foutput_misc_info): Fix usage of the COMPILE_CHECKS macro. * src/server/prot-a-output.c (prot_a_output_misc_info): Fix usage of the COMPILE_CHECKS macro. * src/server/dbck.c (delete_misc): Fix usage of the COMPILE_CHECKS macro. (is_recipient): Likewise. Code cleanup. * src/include/kom-types.h: Removed code within #ifdef PROT_a. It was never used, and is obsoleted by aux-items. 1999-05-19 Per Cederqvist * NEWS: We document in Texinfo, not info. 1999-05-18 Per Cederqvist Avoid ".*" in regexps in the test suite, since they can easily match too much. * src/server/testsuite/lyskomd.0/06.exp: Use "$hollerith" instead of a hard-coded regexp, to avoid parsing past newlines. * src/server/testsuite/lyskomd.0/person-cov.exp: Likewise. * src/server/testsuite/lyskomd.0/send-async-cov.exp: Likewise. * src/server/testsuite/lyskomd.0/04.exp: Use "$any" instead of "." to match any character, to avoid parsing past newlines. * src/server/testsuite/lyskomd.0/membership-cov.exp: Likewise. 1999-05-18 Per Cederqvist Increase coverage. * src/server/testsuite/Makefile.am (EXTRA_DIST): Added lyskomd.0/08.exp. * src/server/testsuite/lyskomd.0/08.exp: New file. 1999-05-18 David Byers * 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 * 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 Use a global variable to store the current time, so that it is never changes during an atomic call, and so that we don't call time() more than once per call. * src/server/server-time.h: New file. * src/server/ramkomd.c (main): Initialize current_time. * src/server/connections.c (milli_timevaldiff): Removed. (dump_statistics): Use current_time instead of calling time(). (toploop): Call time once per select loop instead of calling gettimeofday twice. Simplify the computation of the timeout. * src/server/conference.c (do_create_conf): Use current_time instead of time(). * src/server/text.c (add_text_in_conf): Use current_time instead of calling time(). (do_create_text): Likewise. (add_recipient): Likewise. (add_footnote): Likewise. (add_comment): Likewise. (create_text_add_miscs): Removed the now argument. All callers updated. User current_time instead of now. * src/server/text-garb.c (garb_text): Use current_time instead of calling time(). * src/server/simple-cache.c (sync_part): Use current_time instead of calling time(). (init_cache): Likewise. * src/server/session.c (leave_conf): Use current_time instead of calling time(). (login_old): Likewise. (login): Likewise. (logout): Likewise. (who_is_on_dynamic): Likewise. (get_session_info): Likewise. (get_session_info_ident): Likewise. (get_time): Likewise. (user_active): Likewise. * src/server/send-async.c (async_rejected_connection): Use current_time instead of calling time(). * src/server/person.c (create_person_generic): Use current_time instead of calling time(). * src/server/membership.c (do_add_rec_time): Use current_time instead of calling time(). (do_add_member): Likewise. * src/server/internal-connections.c (init_connection): Use current_time instead of calling time(). (new_client): Likewise. * src/server/aux-items.h: (prepare_aux_item_list): Removed the "now" argument. (prepare_aux_item): Likewise. * src/server/aux-items.c (prepare_aux_item_list): Removed the "now" argument. Use current_time instead. Call callers updated. (prepare_aux_item): Likewise. * src/server/admin.c (modify_server_info): Don't pass the current time to prepare_aux_item_list. Document updateLysKOM and komrunning. Make them accept -v/-V. * doc/lyskomd.texi: Removed all up, next and prev pointers. (Invoking updateLysKOM): New node. (Invoking komrunning): New node. * src/server/updateLysKOM.c (main): Use PACKAGE and VERSION (from config.h) when reporting the version number. * src/server/komrunning.c (usage): Accept -v and -V. (main): Likewise. The test suite now fails without having to wait for a timeout if a wrong result with the proper ref-no is returned. * src/server/testsuite/config/unix.exp (MEMTRACE): Default to /dev/null. (simple_expect): Recognize attempts to match protcol-A replies, and fail without a timeout if the correct reference number is returned with bogus data. Fix "make dist". * src/server/testsuite/Makefile.am (EXTRA_DIST): Added lyskomd.0/07.exp, lyskomd.0/broken-aux-items.conf, lyskomd.0/cache-node-cov.exp, lyskomd.0/conf-file-cov.exp, lyskomd.0/conference-cov.exp, lyskomd.0/connections-cov.exp, lyskomd.0/disk-end-of-atomic-cov.exp, lyskomd.0/internal-connections-cov.exp, lyskomd.0/isc-parse-cov.exp, lyskomd.0/log-cov.exp, lyskomd.0/membership-cov.exp, lyskomd.0/memory-cov.exp, lyskomd.0/person-cov.exp, lyskomd.0/prot-a-parse-cov.exp, lyskomd.0/prot-a-send-async-cov.exp, lyskomd.0/send-async-cov.exp, lyskomd.0/session-cov.exp and lyskomd.0/text-cov.exp. * src/server/Makefile.am (komrunning_SOURCES): Added pidfile.h. (updateLysKOM_SOURCES): Added pidfile.h. (lyskomd_SOURCES): Added trace-alloc.h. Fix the framework for hunting memory leaks. * configure.in: Handle --with-traced-allocations. * acconfig.h (TRACED_ALLOCATIONS): New define. * src/server/trace-alloc.h: New file. * src/server/testsuite/config/unix.exp (lyskomd_start): Handle TRACED_ALLOCATIONS. (lyskomd_fail_start): Likewise. * src/server/ramkomd.c (main): Call trace_alloc_file very early during startup if compiled with TRACED_ALLOCATIONS. * src/server/ram-smalloc.c: Test TRACED_ALLOCATIONS instead of DEBUG_MALLOC. (trace_alloc_file): New function, that sets up malloc_fp. (trace_smalloc): Write to malloc_fp. (trace_free): Likewise. (srealloc): Likewise. * src/server/ram-smalloc.c: Don't test USE_GNU_MALLOC; that symbol was removed 1998-08-09. 1999-05-16 David Byers * 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 * src/server/aux-items.c (aux_item_trigger_link_item): New function for debugging linking aux items. 1999-05-14 Per Cederqvist Fixes to the test suite. * src/server/testsuite/lyskomd.0/connections-cov.exp: A client dies immediately when it receives %% No connections left, so the test case should not expect it to live longer. Renumber the ref-nos. The nologin file exists in the build directory, not in srcdir. * src/server/testsuite/leaks.0/leaks02.exp: Don't forget the flags argument to create-person. * src/server/testsuite/lyskomd.0/conference-cov.exp: Don't attempt to use debug calls unless debug_calls is true. * src/server/testsuite/lyskomd.0/person-cov.exp: Likewise. * src/server/testsuite/lyskomd.0/person-cov.exp: Look for config/prot-a.exp in srcdir. Don't fail if the clock ticks. * src/server/testsuite/lyskomd.0/conference-cov.exp: Look for config/prot-a.exp in srcdir. * src/server/testsuite/lyskomd.0/connections-cov.exp: Likewise. * src/server/testsuite/lyskomd.0/membership-cov.exp: Likewise. * src/server/testsuite/lyskomd.0/prot-a-parse-cov.exp: Likewise. * src/server/testsuite/lyskomd.0/prot-a-send-async-cov.exp: Likewise. * src/server/testsuite/lyskomd.0/send-async-cov.exp: Likewise. * src/server/testsuite/lyskomd.0/session-cov.exp: Likewise. * src/server/testsuite/lyskomd.0/text-cov.exp: Likewise. * src/server/testsuite/config/unix.exp (timeout): Don't alter the default value. Not every computer is fast computer. (lyskomd_start): The aux-item config file is found relative to $srcdir, not [pwd]. The config/lyskomd-config file is found relative to the current working directory. (lyskomd_fail_start): Likewise. Find the database files relative to top_srcdir. 1999-05-14 David Byers * 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. * 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): Expect 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 * 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 Distribute the leaks tests, and run them during "make check". * src/server/testsuite/Makefile.am (EXTRA_DIST): Track the rename of lyskomd.0/leaks*.exp -> leaks.0/leaks*.exp. (check): Depend on check-leaks. (check-leaks): New target. Code cleanup/minor bugs fixed. * src/server/testsuite/tcpconnect.py: socket.recv can raise socket.error! Handle it as end-of-file. * src/server/simple-cache.c (cached_conf_exists): Removed the unused variable node. * src/server/aux-items.c (find_linked_aux_item_list): Don't use an uninitialized variable. (delete_aux_item_list): Fail if the default branch is reached. (undelete_aux_item_list): Fail if the default branch is reached. (aux_item_trigger_mirror_faq): Test data->object for NULLness intstead of the uninitialized variable conf_stat. * doc/hacking.texi (Linking Pairs of Aux Items): Texinfo problem fixed. * doc/Protocol-A.texi (set-info): Untabify. (accept-async): Untabify. (query-async): Untabify. 1999-05-12 David Byers Stuff I forgot to add below * Renamed log to kom_log since log is a function in math.h. * src/include/services.h (set_pers_flags): New prototype. (create_person): Added flags parameter. * run-support/config: Set defaults for max texts and max conferences. * run-support/aux-items.conf (faq-text): Removed all triggers. Set add-trigger to link-faq, added validator. (faq-for-conf): New item definition. * doc/lyskomd.texi (Parameters): Added Max conferences, Max texts, Max client data length, Nologin file. Updated some other parameter descriptions. (Aux-Item Definition File): Added system-only. Rewrote validate to allow function identifiers. Added list of validator functions and triggers. (Files): Document /etc/nologin. * doc/hacking.texi: Correct minor typos. Change some @code into @file. (Linking Pairs of Aux Items): New section. * doc/Protocol-A.texi: Correct minor typos (Predefined Aux-Item Types): Rephrase some of the text. Remove statement that faq-text item marks a text. Document faq-for-conf. Specify formate for mx-message-id. (Simple Data Types): Removed documentation for INTEGER. (set-etc-motd): Change too-many-marks to mark-limit (mark-text-old): Change too-many-marks to mark-limit (set-conf-type): Correct documentation for secret-public error. Correct spelling in invalid-membership-type documentation. (add-recipient): Add documentation for access-denied error (add-comment): Define error-status in index-out-of-range. (sub-comment): Change no-comment to not-comment. (send-message): Complete documentation of message-not-sent error. (create-text): Add index-out-of-range as possible error. (create-conf): Complete doc of permission-denied error. (create-person): Added personal-flags parameter. (create-person): Document person-exists error. (set-pers-flags): New call. (Error Codes): Clarify message-not-sent and index-out-of-range. * configure.in: Added flag --with-insure++. Define AVOID_ABORTS when compiling with support for gcov. * src/server/testsuite/tcpconnect.py: Added #hose socket to hose the socket with lots of zeroes. * src/server/testsuite/config/prot-a.exp: New functions kom_set_permitted_submitters, kom_set_super_conf, kom_login_old, kom_mark_text, kom_sub_recipient, kom_set_conf_type, kom_change_conference, kom_set_priv_bits. (kom_create_person): Send the pers_flags field. * src/server/testsuite/config/unix.exp: Print a dot for every test case in verbose mode. (lyskomd_start): New parameters extra_config for additional config file contents and base_config for basic config file contents (defaults will not be used.) Don't print defaults for max conferences or max texts if they are in extra_config. It is possible to start lyskomd with arbitrary arguments. (lyskomd_fail_start): Function to use when lyskomd is supposed to not start properly (like lyskomd_start, but server failue is expected.) (client_start_fail): New function like client_start, but failure is expected. (kill_client): Unset expect_active and expect_always instead of setting to the empty string. (hose_client): New function * src/server/testsuite/lyskomd.0/00.exp: Send pers-flags in calls to create-person. * src/server/testsuite/lyskomd.0/01.exp: Update expected results in query-predefined-aux-items. Send pers-flags in call to create-person. Add test for set-pers-flags. Add test for nonexistent call 107. * src/server/testsuite/lyskomd.0/02.exp: Send pers-flags in call to create-person. * src/server/testsuite/lyskomd.0/03.exp: Expect aux-item 28 in query-predefined-aux-items. Send pers-flags in call to create-person. Expect the faq-for-conf aux-item in test 1327. Expect failure attempting to set nonexistent text as faq (test 1342.) Remove the now failed faq item in subsequent tests. Add test for set-pers-flags. * src/server/testsuite/lyskomd.0/04.exp: Send pers-flags in calls to kom_create_person. * src/server/testsuite/lyskomd.0/05.exp: Send pers-flags in calls to kom_create_person. Be more flexible when expecting time corresponding to time_t zero. Set garb and sync interval to something really high to avoid spurious async messages while running the tests. * src/server/testsuite/lyskomd.0/06.exp: Send pers-flags in calls to kom_create_person. * src/server/testsuite/lyskomd.0/admin-cov.exp: More setup to support new tests. Test that we can't send messages to secret confs. Test that messages are filtered for passive members. * src/server/testsuite/lyskomd.0/aux-items-cov.exp: Send pers-flags in calls to kom_create_person. Attempt to create aux-items with broken validation regexp. Test the system-only attribute. Test a broken aux-item config file. * src/server/testsuite/lyskomd.0/aux-items.cov: Add an item definition with system-only property. * src/server/prot-a-parse.h: Added prototype for prot_a_parse_pers_flags * src/server/prot-a-parse.c (prot_a_parse_pers_flags): New function to parse pers flags. * src/server/prot-a-output.c (prot_a_output_text_mapping): Initialize the fields of iter to avoid warnings from tools that detect access to uninitialize memory. * src/server/local-to-global.c: Use kom_log instead of log. * src/server/kom-memory.c: Added prototypes for init_aux_item and init_aux_item_link. * src/server/aux-items.c (system_check_add_aux_item_list): Call aux_item_add_perm with INFO_OBJECT_TYPE for the object_type parameter. * src/server/admin.c: Use kom_log instead of log everywhere. (send_message): Do not permit sending group messages to secret conferences. Set errno to KOM_MESSAGE_NOT_SENT if there are no appropriate recipients. * src/server/aux-item-def-parse.y: Parse validation functions in addition to validation regexps. Use kom_log instead of log. Parse the system-only property. (aux_item_def_check_validate): New function. * src/server/aux-items.c: Add the aux-item being involved item itself to aux-item trigger data. (aux_item_validate_existing_text): New validation function. (aux_item_trigger_mirror_faq): New add trigger function (aux_item_trigger_unmark_text): Modified to work for aux-items on texts and conferences, not just conferences. Do not unmark an unmarked text. (aux_item_trigger_mark_text): Do not add more marks than permitted. (find_aux_item_index): New function to find the index of an item with a particular number in an aux item list. (commit_aux_item_list): Renamed to commit_aux_item_list_internal. (commit_aux_item_list_internal): Delete linked aux items. (commit_aux_item_list): Wrapper for commit_aux_item_list_internal. (delete_aux_item_list): Manage deletion of linked items. (undelete_aux_item_list): Manage undeletion of linked items. (mark_linked_object_as_changed): New function to mark the object containing a linked aux item as changed. (find_linked_aux_item): New function to find the aux item that is linked to a given aux item. (find_linked_aux_item_list): New function to find the aux item list containing the aux item that is linked to a given aux item. (aux_item_validate): New function for validating aux items. Deals with regexps and validation functions. (aux_item_add_perm): Handle the system-only property of aux item definitions. 1999-05-09 David Byers * src/server/aux-items.c (prepare_aux_item): Clear the linked_item field properly. * src/server/memory.c (init_aux_item_link): New function. (init_aux_item): Use init_aux_item_link (init_aux_item): New function added earlier. * src/server/prot-a-parse.c (prot_a_parse_aux_item): Clear the parsed aux_item to get good defaults for fields that are not read in the parser. * src/server/admin.c (modify_server_info): Pass INFO_OBJECT_TYPE to delete_aux_item_list and undelete_aux_item_list. * src/server/aux-items.h: Changed all declarations of object_type from short to Object_type. * src/server/aux-items.c: Changed all declarations of object_type from short to Object_type. * src/server/ram-parse.c (fparse_aux_item_link): New function. (fparse_aux_item): Parse the link as well. * src/include/kom-types.h (Object_type): New type (moved defs from aux-items.h) (Aux_item_link): New type (Aux_item): Added linked_item field. * src/server/ram-output.c (foutput_aux_item): Output linked_item field. (foutput_aux_item_link): New function to output a link to another aux item. * src/server/aux-items.c: Added handling of item field in aux item trigger calls. * src/server/aux-items.h (Aux_item_trigger_data_s): Added item field. * src/server/aux-items.c (system_check_add_aux_item_list): Set owner_check to TRUE in call to aux_item_add_perm so system-only restriction works on system-info aux-item list. * src/server/testsuite/lyskomd.0/admin-cov.exp: Added tests for sending messages to secret confs and to conf with passive member logged in. * doc/Protocol-A.texi (send-message): Document that message-not-sent is returned when there are no recipients for a group message. * src/server/com-h.awk: Set illegal_fnc to -1 (was cnt) since cnt might be a legal function. 1999-05-02 Per Cederqvist "make check" in the top directory failed in some environments. * src/server/testsuite/Makefile.am (check-lyskomd): Close file descriptors 3-9 to avoid interference between file descriptors inherithed from make, sshd et c with lyskomd.0/07.exp. 1999-05-01 Per Cederqvist Use libisc-1.00. * src/libraries/libisc-new: Replace the old contents with that of isc-1.00. Se src/libraries/libisc-new/ChangeLog for information about any modifications that are made to the library. 1999-04-28 Per Cederqvist Remove support for the mux protocol. Don't use isc_printf. * src/server/testsuite/lyskomd.0/07.exp: Decrease the all file descriptors by one, now that the server no longer listens for a mux. Test that protocol B is unsupported. * src/server/testsuite/config/unix.exp (muxport): Removed. (lyskomd_start): Don't set "Mux port" in the config file. * src/server/server-config.c (parameters): Removed parameter "Mux port". * doc/lyskomd.texi (Parameters): Removed "Mux port". * src/server/ramkomd.c (listen_mux): Removed. (server_init): Remved the "mux_port" argument. Don't listen for muxes. (initialize): Don't pass the "mux_port" argument to server_init. * src/server/prot-a.c (prot_a_reply): Use isc_putc, isc_putul, isc_flush and prot_a_output_ul instead of mux_printf, mux_flush and mux_putc. (prot_a_parse_packet): Likewise. * src/server/prot-a-send-async.c (async_header): Use isc_putc, isc_putul, prot_a_output_ul and isc_flush instead of mux_printf, mux_putc and mux_flush. (async_trailer): Likewise. (prot_a_async_new_text_old): Likewise. (prot_a_async_new_text): Likewise. (prot_a_async_logout): Likewise. (prot_a_async_new_name): Likewise. (prot_a_async_forced_leave_conf): Likewise. (prot_a_async_login): Likewise. (prot_a_async_send_message): Likewise. (prot_a_async_deleted_text): Likewise. (prot_a_async_new_recipient): Likewise. (prot_a_async_sub_recipient): Likewise. (prot_a_async_new_membership): Likewise. * src/server/prot-a-output.h (prot_a_output_ul): New function. * src/server/prot-a-parse.c (prot_a_get_token): Use isc_puts and isc_flush instead of mux_printf and mux_flush. (prot_a_parse_num_list): Likewise. (prot_a_parse_string): Likewise. * src/server/prot-a-output.c (prot_a_output_ul): New function. (prot_a_output_person): Use prot_a_output_ul, isc_puts, isc_putc and isc_write instead of mux_printf, mux_putc and mux_write. (prot_a_output_membership_type): Likewise. (prot_a_output_membership): Likewise. (prot_a_output_membership_old): Likewise. (prot_a_output_membership_list_old): Likewise. (prot_a_output_membership_list): Likewise. (prot_a_output_conf_list): Likewise. (prot_a_output_conf_no_list): Likewise. (prot_a_output_conference): Likewise. (prot_a_output_conference_old): Likewise. (prot_a_output_uconference): Likewise. (prot_a_output_mark_list): Likewise. (prot_a_output_aux_item_flags): Likewise. (prot_a_output_aux_item): Likewise. (prot_a_output_text_stat_old): Likewise. (prot_a_output_aux_item_list): Likewise. (prot_a_output_who_info_ident): Likewise. (prot_a_output_who_info): Likewise. (prot_a_output_who_info_list): Likewise. (prot_a_output_who_info_ident_list): Likewise. (prot_a_output_who_info_list_old): Likewise. (prot_a_output_session_info): Likewise. (prot_a_output_session_info_ident): Likewise. (prot_a_output_info_old): Likewise. (prot_a_output_string): Likewise. (prot_a_output_priv_bits): Likewise. (prot_a_output_personal_flags): Likewise. (prot_a_output_conf_type): Likewise. (prot_a_output_extended_conf_type): Likewise. (prot_a_output_member_list): Likewise. (prot_a_output_member_list_old): Likewise. (prot_a_output_member): Likewise. (prot_a_output_member_old): Likewise. (prot_a_output_mark): Likewise. (prot_a_output_misc_info): Likewise. (prot_a_output_time): Likewise. (prot_a_output_session_no): Likewise. (prot_a_output_text_no): Likewise. (prot_a_output_conf_z_info): Likewise. (prot_a_output_conf_z_info_list): Likewise. (prot_a_output_version_info): Likewise. (prot_a_output_num_list): Likewise. (prot_a_output_dynamic_session_info): Likewise. (prot_a_output_dynamic_session_info_list): Likewise. (prot_a_output_l2g_iterator_as_text_list): Likewise. (prot_a_output_text_mapping): Likewise. (prot_a_output_memory_info): Likewise. * src/server/param.h (struct kom_par): Removed ip_mux_port, num_ip_mux_port and num_ip_client_port. * src/server/isc-interface.h (ISC_UDGTYPE): Use "struct connection" instead of "struct mux". (ISC_PRINTF_SUPPORT): Don't define it. * src/server/internal-connections.c (init_connection): Use isc_session instead of mux. (kill_client): Likewise. * src/server/connections.h (Connection): Replaced mux with isc_session. * src/server/connections.c (logout_client): Use ISC instead of the removed mux layer. (parse_packet): Likewise. (parse_unparsed): Likewise. (login_request): Likewise. Don't handle muxes. (logout_request): Likewise. (message_request): Likewise. (mux_handle_packet): Removed. (mux_logout): Removed. (mux_parse_unparsed): Removed. (mux_parse_message): Removed. (milli_timevaldiff): New name for former timevaldiff. Return the difference in milliseconds instead of microseconds. (toploop): Use milli_timevaldiff instead of timevaldiff. This is a thousand times better at avoiding overflow. Use isc_puts instead of isc_printf. * src/server/mux.h: File removed. * src/server/mux.c: File removed. * src/server/mux-parse.h: File removed. * src/server/mux-parse.c: File removed. * src/server/Makefile.am (lyskomd_SOURCES): Removed mux-parse.h and mux.h. (MUX): Removed. Removed mux.c and mux-parse.c. (GENOBJS): Removed $(MUX). * doc/mux.proto: File removed. * doc/Makefile.am (EXTRA_DIST): Remove mux.proto. * configure.in: Remove enable_isc_printf -- we no longer need isc_printf. Fix a warning message in the testsuite. * src/server/testsuite/lyskomd.0/admin-cov.exp: Fixed the "unsupported" message: The configure option is named --with-debug-calls, not --enable-debug-calls. 1999-04-25 Per Cederqvist Increase the block size of the l2g structure from 10 to 250. * src/server/local-to-global.h (l2g_set_block_size): New function. * src/server/local-to-global.c (L2G_BLOCKSIZE): Now a static int instead of a define. (l2g_set_block_size): New function, that can be called once to set the block size (l2g_init): Set the block size to 250 unless it has already been set. * src/server/testsuite/test-l2g.c (main): Set the block size to 10. 1999-04-23 David Byers * src/server/standalone.c (kom_info): Initialize the aux_item_list too. * src/server/ramkomd.c (initialize): Use kom_log instead of log. * src/server/local-to-global.c (l2g_read): Use kom_log instead of log. * src/server/text.c (text_read_access): Call person_text_read_access to do the work. (person_text_read_access): New function generalizes text_read_access. * src/server/manipulate.h: Prototype for person_text_read_access. 1999-04-21 David Byers * src/server/aux-items.c (aux_item_find_validator): New function. 1999-04-20 Per Cederqvist Two file descriptors were leaked during startup. * src/server/aux-item-def-parse.y (parse_aux_item_definitions): Close the config file once it is read. * src/server/conf-file.c (read_config): Close the config file once it is read. 1999-04-19 Per Cederqvist New parameter: "Client host". * doc/lyskomd.texi (Parameters): Documented "Client host". * src/server/server-config.c (parameters): New parameter: "Client host". * src/server/ramkomd.c (server_init): New argument: host. Bind the specified IP number. (initialize): Pass param.ip_client_host to server_init. * src/server/param.h (struct kom_par): Added ip_client_host. 1999-04-19 Per Cederqvist Test the "% No connections left." message. * src/server/testsuite/lyskomd.0/07.exp: Test what happens when too many clients try to connect at the same time. 1999-04-18 Per Cederqvist More documentation. * doc/lyskomd.texi (Parameters): Documented "lyskomd path", "savecore path", "Normal shutdown time", "Mail after downtime" and "Mail until downtime". * doc/Protocol-A.texi (Protocol Version History): Call 102=set-membership-type was omitted, and later calls were misnumbered. (map-created-texts): Documented. 1999-04-18 Per Cederqvist Removed the last hardcoded configuration from updateLysKOM. * src/server/updateLysKOM.c (savecore): Use param.core_dir and param.savecore_path instead of hardcoding the values. * src/server/server-config.c (parameters): New parameter: "savecore path". (read_configuration): Handle param.savecore_path. * src/server/param.h (struct kom_par): New parameter: savecore_path. 1999-04-17 Per Cederqvist updateLysKOM now reads the configuration file. * src/server/updateLysKOM.c (usage): New function. (checkstatus): Use parameters "Normal shutdown time", "Mail after downtime" and "Mail until downtime" instead of using hard-coded values. Use "mail" instead of "Mail" to send the mail. (main): Read the configuration file. Use parameters "Pid file", "Status file" and "lyskomd path" instead of hard-coded values. * src/server/server-config.c (param): Moved here from various files. (parameters): Added "Normal shutdown time", "Mail after downtime", "Mail until downtime" and "lyskomd path". (read_configuration): Handle param.lyskomd_path. * src/server/ramkomd.c: (param): Moved to server-config.c. * src/server/dbck.c (param): Moved to server-config.c. * src/server/Makefile.am (READ_CONFIG): New variable. (komrunning_SOURCES): Use READ_CONFIG to simplify code. (updateLysKOM_SOURCES): Added READ_CONFIG. * src/server/param.h (struct kom_par): New parameters: lyskomd_path, normal_shutdown_time, downtime_mail_start and downtime_mail_end. * src/server/server-config.c (parameters): Moved a few entries around, so that they fit under the various headings. Fixes to komrunning.c. * src/server/komrunning.c (param): Moved to server-config.c. (create_status): Write the name of the user as the first line of the status file. With luck, that is a valid email address. Handle many simultaneous clients. * src/server/connections.c (login_request): Don't handle the "% No connections left" situation. (toploop): Handle ISC_EVENT_LOGIN_UNRELOCATED by returning a "% No connections left" message and closing the session, the way login_request used to do. * src/server/ramkomd.c (initialize): Warn if getrlimit and sysconf don't agree on the number of possible open files. 1999-04-17 Per Cederqvist Work towards handling more than 250 simultaneous clients. * src/server/ramkomd.c (server_init): Use isc configuration 1006 and isc session configuration 1002. Fill in fd_relocate with PROTECTED_FDS. 1999-04-17 Per Cederqvist Re-implement komrunning in C. * src/server/standalone.c (register_jubel): Dummy implementation. * src/server/dbck.c (register_jubel): Moved to standalone.c. * src/server/dbck-cache.c (kom_info): Moved to standalone.c. * src/server/komrunning.c: New file; a reimplementation of komrunning.sh in C. * src/server/Makefile.am (bin_PROGRAMS): Added komrunning. (komrunning_SOURCES): New variable, which among other files includes komrunning.c. (updateLysKOM_SOURCES): Added pidfile.c. (dbck_SOURCES): Added standalone.c. * run-support/komrunning.sh: Removed. * run-support/Makefile.am (komrunning): Target removed. (bin_SCRIPTS): Removed komrunning. (EXTRA_DIST): Removed komrunning.sh. (MOSTLYCLEANFILES): Removed komrunning. Introduce the "Status file" parameter. * src/server/server-config.c (parameters): Added "Status file". (read_configuration): Handle param.status_file. * src/server/param.h (struct kom_par): Added status_file. * doc/lyskomd.texi (Parameters): Documented "Status file". Move pid file reading to pidfile.c. * src/server/updateLysKOM.c (main): Use pidfile to simplify code. * src/server/pidfile.h (read_pid_file): New function. * src/server/pidfile.c (read_pid_file): New function. 1999-04-15 Per Cederqvist Document 103=local-to-global. * doc/Protocol-A.texi (accept-async): Added the error code long-array. (add-member): Added a comment. (local-to-global): Documented. (The User Area): Register WWW-kom. Test suite improvement. * src/server/testsuite/lyskomd.0/03.exp: Test calls 103 and 104. 1999-04-06 Per Cederqvist Yesterdays changes were incomplete. * src/server/ramkomd.c: Include local-to-global.h. 1999-04-05 Per Cederqvist Explain the Text-Mapping data type. * doc/Protocol-A.texi (LysKOM Data Types): Explain Text-Mapping. 1999-04-05 Per Cederqvist Change the external file format of a Local_to_global. * src/server/testsuite/l2g.0/09.exp: Adjusted to new external format of Local_to_global. * db-crypt/db/lyskomd-data: Adapted to new format of Local_to_global objects. * src/server/local-to-global.c (l2g_read): New file format. (put_ulong): New static function. (l2g_write): New file format. * src/server/testsuite/l2g.0/11.exp: Added lots of test cases for l2g_write. Added statistics to Local_to_global. * src/server/ramkomd.c (dump_exit_statistics): Call dump_l2g_stats. * src/server/local-to-global.h: Comments added and improved. (dump_l2g_stats): New function. * src/server/local-to-global.c (nr_constructs): New static variable, used to gather statistics. Changed all functions to set it where appropriate. (nr_l2gs): Likewise. (nr_l2gs_peak): Likewise. (nr_destructs): Likewise. (nr_clears): Likewise. (nr_copies): Likewise. (nr_joins): Likewise. (nr_joined_blocks): Likewise. (nr_blocks): Likewise. (nr_blocks_peak): Likewise. (nr_blocks_sparse): Likewise. (nr_blocks_sparse_peak): Likewise. (sparse_skip_cost): Likewise. (nr_sparse_compactions): Likewise. (nr_sparsifications): Likewise. (l2g_destruct): Actually fill the destructed object with garbage data, unless NDEBUG is defined. (dump_l2g_stats): New function. Make a lot of functions in ram-output.c static. Increase const awareness. * src/server/ram-output.c (foutput_person_0): Added const qualifier to the person argument. (foutput_person_2): Likewise. (foutput_person): Likewise. (foutput_conference_2): Added const qualifier to the conf_c argument. (foutput_aux_flags): Now static. (foutput_aux_item): Now static. (foutput_aux_item_list): Now static. Added const qualifier to the aux argument. (foutput_membership_type): Now static. (foutput_string): Now static. (foutput_priv_bits): Now static. (foutput_personal_flags): Now static. (foutput_text_list): Now static. (foutput_mark_list): Added const qualifier to the mark_list argument. (foutput_mark): Now static. (foutput_membership_list): Now static. (foutput_time): Now static. (foutput_member_list): Now static. (foutput_member): Now static. (foutput_conf_type): Now static. (foutput_misc_info): Now static. (foutput_ulong): Now static. * src/server/ram-output.h: Track changes in ram-output.c. * src/include/kom-types.h (Text_mapping): The l2g pointer is const. Some minor improvements to memory handling. * src/server/memory.c (free_conference): Call l2g_destruct. (free_person): Likewise. * src/server/conference.c (do_delete_conf): Don't call l2g_clear, since cache_delete_conf will do so. Remove useless compiler warnings. * configure.in: Don't use -Wtraditional and -Wnested-externs. Test suite improvement. * src/server/testsuite/config/unix.exp (lyskomd_death): Collect etc/memory-usage in usage.all. Test suite fix. * src/server/testsuite/config/unix.exp (lyskomd_start): The detection of a server compiled with --with-debug-calls was broken. Test Local_to_global even more. * src/server/testsuite/l2g.0/11.exp: Increase coverage even further. Test l2g_clear. * src/server/local-to-global.h: Comments improved. * src/server/local-to-global.c: Comments improved. 1999-04-05 Per Cederqvist Added range-begin and range-end to Text-Mapping. * doc/Protocol-A.texi (LysKOM Data Types): Added range-begin and range-end to Text-Mapping. * src/server/prot-a-output.c (prot_a_output_text_mapping): Emit range-begin and range-end. * src/server/person.c (map_created_texts): Set result->first to the first text number that the user requested. Don't move it forward if the text has been deleted. * src/server/text.c (local_to_global): Likewise. * src/server/testsuite/lyskomd.0/00.exp: Expect range-begin and range-end in Text-Mappings. 1999-04-04 Per Cederqvist Merge everything from prot-A.txt into Protocol-A.texi and remove prot-A.txt. * doc/prot-A.txt: Removed. Everything in it should now be present in Protocol-A.texi. * doc/Makefile.am (EXTRA_DIST): Removed prot-A.txt. * doc/Protocol-A.texi: Removed all up, next and prev pointers. Makeinfo can figure them out automatically. Fixed proper nesting of nodes, and use @Top, so that this work. Merge everything in prot-A.txt into this document: (Document Revision History): This is going to be revision 10.0 which documents protocol version 10. 9.0 was distributed with lyskomd 1.9.0. 8.0 was distributed with lyskomd 1.8.0. (Protocol Version History): New name for former "Protocol Revision History". Updated the information about version 9. (Protocol Design Principles): Node removed. The "Client-Server Dialog" node contains the same information. (Client-Server Dialog): Specify the LysKOM port in the example. (Simple Data Types): Moved the text about data element separator and call terminator to "Client-Server Dialog". (user-active): Talk more about when clients should send this. (who-is-on-dynamic): Improved the explanation. (get-static-session-info): State that the returned information is immutable. Distribute sigflags.h. * src/server/Makefile.am (lyskomd_SOURCES): Added sigflags.h. 1999-04-03 Per Cederqvist Renam do_sync_db to do_statistics. Use sig_atomic_t instead of Bool for variables set from signal handlers. * src/server/sigflags.h: New file, containing sig_atomic_t flags. * src/server/ramkomd.c: Include "sigflags.h". (sighandler_hup): Use 1 instead of TRUE as value of go_and_die. (sighandler_usr1): Use 1 instead of TRUE as value of do_statistics. Use do_statistics instead of do_sync_db. * src/server/connections.h (go_and_die): Declaration moved to sigflags.h. (do_sync_db): Renamed to do_statistics and moved to sigflags.h. * src/server/connections.c (go_and_die): Now sig_atomic_t instead of Bool. (do_statistics): New name for former do_sync_db. New type: sig_atomic_t instead of Bool. All users of do_sync_db updated. (toploop): Don't call cache_sync when do_statistics is set. * src/server/admin.c (shutdown_kom): Set go_and_die to 1, not TRUE. Cosmetic code cleanup. * src/server/prot-a-parse-arg-c.awk: Insert a blank line between the system includes and the local includes. Remove the empty function cache_sync. Rename cache_sync in dbck to cache_sync_all. * src/server/simple-cache.c (cache_sync): Removed. * src/server/logII.c (log): Call cache_sync_all instead of cache_sync. * src/server/dbck.c (garb_text_file): Call cache_sync_all instead of cache_sync. (main): Likewise. * src/server/dbck-cache.c (cache_sync_all): New name for former cache_sync. * src/server/cache.h (cache_sync): Function removed. Distribution cleanup. * src/server/Makefile.am (EXTRA_DIST): Don't distribute logII.c. * configure.in: Create src/libraries/regex/doc/Makefile and src/libraries/regex/test/Makefile. Documentation fixes. * doc/lyskomdb.texi (Version 0): next-free-num and next-text-num are one greater than the number of existing records. (Version 1): The same error probably exists here. Added comment about it. * doc/lyskomd.texi (Server Configuration File): Markup fixes. (Parameter Types): Markup fixes. (Parameters): Markup fixes. (Aux-Item Definition File): Markup fixes. (Administration): Update the discussion about updateLysKOM, dbck and komrunning. Markup fixes. Make all man pages obsolete. Generate the version number in lyskomd.texi automatically. Make sure that lyskomd.texi and dbck.texi includes everyting that was documented in the man pages. * mkmi: Remove scripts/mdate-sh, which should be generated by automake. * doc/man/dbck.8: All documentation removed. Refer to dbck.info. * doc/man/lyskom.5: Documentation removed. Refer to lyskomdb.info. * doc/man/updateLysKOM.8: All documentation removed. Refer to lyskomd.info. * doc/dbck.texi (Invoking dbck): Mention that dbck with no argument will examine the database without modifying it. (General Options): Document -h (aka --help). (Format Conversion Options): Minor layout fix. (Notes): Typos fixed. (Files): Markup fixes. * doc/Makefile.am: Break long lines. * doc/man/lyskomd.8: All documentation removed. Refer to lyskomd.info. * doc/lyskomd.texi: Include version.texi and use @value{VERSION} instead of hard-coding the value. (Overview): Add Peter Eriksson to the list of signficant contributors. ISC was a piece of very important "enabling technology". (Parameter Types): Mention that all files are absolute if the begin with '/'. (Parameters): Use @var{} instead of @i{}. Markup fixes and other minor typo fixes. The "Log statistics" path is used when the server receives a SIGUSR1 signal -- not a SIGHUP! (Aux-Item Definition File): The file name was wrong. Don't use @i{}. Document the "server" keyword. Mention that permanent aux-items will be deleted when the object they belong to are deleted. (Signals): Removed a note about SIGUSR2 not working on Suns. It should work fine there as well. (Files): Don't use @i{}. (Bugs): There is no detectable memory leak worth noting. 1999-04-03 Per Cederqvist The test cases shouldn't fail just because --with-debug-calls wasn't enabled. * src/server/ramkomd.c (main): Emit a warning message when --with-debug-calls is enabled. * src/server/testsuite/config/unix.exp (lyskomd_start): Look for the warning message about --with-debug-calls, and set debug_calls to a true value if it is found. * src/server/testsuite/lyskomd.0/admin-cov.exp: Don't attempt to use debug calls unless debug_calls is true. 1999-04-02 Per Cederqvist Fix "make clean". * src/server/testsuite/Makefile.am (mostlyclean-local): Remove db and etc. Use automake defaults for the Lex and Yacc files, so that the distribution works. * src/server/Makefile.am (YFLAGS): Set it to "-d" so that we get the .h header file. (EXTRA_DIST): Removed aux-item-def.l and aux-item-def.y. (MAINTAINERCLEANFILES): Removed aux-item-def.tab.h. (lyskomd_SOURCES): Added aux-item-def-parse.y, aux-item-def-parse.h and aux-item-def-scan.l. (DISKOBJS): Removed aux-item-def.tab.c and aux-item-def.lex.c. (aux-item-def.tab.c): Target removed. Rely on automake. (aux-item-def.lex.c): Target removed. Rely on automake. * src/server/aux-item-def-parse.y: Rename hack added. Don't redefine yyin and yylineno, since the Lex file no longer uses "%option prefix". Remove blank lines at end of file. * src/server/aux-item-def-scan.l: Rename hack added. Include aux-item-def-parse.h instead of aux-item-def.tab.h. Don't redefine yylval and yyerror, and don't use "%option prefix" -- this change makes it impossible to have multiple Lex scanners, but on the other hand, it makes it possible to use automake. * src/server/aux-item-def.l: Renamed aux-item-def-scan.l. * src/server/aux-item-def.y: Renamed aux-item-def-parse.y. Added some missing files to the distribution. * doc/Makefile.am (EXTRA_DIST): Added IDEAS. * src/include/Makefile.am (noinst_HEADERS): Added kom-config.h. * src/server/Makefile.am (EXTRA_DIST): Added prot-a-is-legal-fnc.awk. * src/server/testsuite/Makefile.am (EXTRA_DIST): Added renumber.el, l2g.0/*.exp, lyskomd.0/*.exp, lyskomd.0/summarize.sh, lyskomd.0/aux-items.conf, lyskomd.0/aux-items.cov and lyskomd.0/aux-items.leaks. 1999-04-02 Per Cederqvist Make it possible to run "make check" even when not building in srcdir. * src/server/testsuite/config/unix.exp: (lyskomd_start): Run the test suite in the build directory. Look for files relative to $srcdir or top_srcdir so that they are found properly. (aux_item_default_conf_file): Use $top_srcdir to get a full path. * src/server/testsuite/config/leaks.exp: Look for exp files in $srcdir. * src/server/testsuite/lyskomd.0/04.exp: Likewise. * src/server/testsuite/lyskomd.0/05.exp: Likewise. * src/server/testsuite/lyskomd.0/06.exp: Likewise. * src/server/testsuite/lyskomd.0/admin-cov.exp: Likewise. * src/server/testsuite/lyskomd.0/aux-items-cov.exp: Likewise. * src/server/testsuite/lyskomd.0/leaks00.exp: Likewise. * src/server/testsuite/lyskomd.0/leaks01.exp: Likewise. * src/server/testsuite/lyskomd.0/leaks02.exp: Likewise. * src/server/testsuite/lyskomd.0/leaks03.exp: Likewise. * src/server/testsuite/lyskomd.0/leaks04.exp: Likewise. * src/server/testsuite/lyskomd.0/leaks05.exp: Likewise. * src/server/testsuite/lyskomd.0/leaks06.exp: Likewise. * src/server/testsuite/lyskomd.0/leaks07.exp: Likewise. * src/server/testsuite/lyskomd.0/leaks08.exp: Likewise. * src/server/testsuite/lyskomd.0/leaks99.exp: Likewise. Fix broken tests. * src/server/testsuite/lyskomd.0/01.exp: The test could fail due to bad timing. Fixed. Makefile fixes. * src/server/testsuite/config/Makefile.am (EXTRA_DIST): Added leaks.exp. (MOSTLYCLEANFILES): Added lyskomd-config. 1999-03-31 Per Cederqvist Fix bugs in "make dist". * doc/Makefile.am (EXTRA_DIST): Removed Makefile.src. Dead code removal. * src/server/local-to-global.c (find_block_index_key): Blocks can never be completely empty. Code simplified accordingly. (l2g_append): Likewise. (l2gi_next): Likewise. * src/server/ram-parse.c (fparse_info_2): Unreachable code removed. Increase coverage of local-to-global.c. * src/server/testsuite/l2g.0/11.exp: New file. 1999-03-28 Per Cederqvist * TODO: Updated according to priorization made by me and David Byers. 1999-03-28 David Byers * src/server/simple-cache.c (cached_conf_exists): Test existance in small_conf_arr. Don't go to disk. (cached_delete_conf): Free the associated small_conf_stat and set small_conf_arr[x] to NULL. * run-support/aux-items.conf: Restrict creation of mx-author to creation time. 1999-02-06 Per Cederqvist * configure.in: Fixed a syntax error introduced yesterday. 1999-02-05 Per Cederqvist Don't produce meaningless warnings. * configure.in: Remove -Wshadow and -Wcast-qual since they give too many false warnings and are of limited use. Get rid of some warnings. * src/include/kom-types.h (Version_info_internal): const qualifiers added. * src/server/Makefile.am (version-info.c): Added const qualifier to kom_version_info. * src/server/version-info.h (kom_version_info): Added const qualifier. Don't use the wrong member of a union. * src/server/prot-a.c (prot_a_reply): Emit res->membership_list_old, not res->membership_list, when the return type is rt_membership_list_old. Remove the L2g_iterator_as_text_list typedef. * src/server/text.c (get_map): Use L2g_iterator instead of L2g_iterator_as_text_list. * src/server/prot-a-output.h, src/server/prot-a-output.c (prot_a_output_l2g_iterator_as_text_list): Use L2g_iterator instead of L2g_iterator_as_text_list. * src/server/person.c (get_created_texts): Use L2g_iterator instead of L2g_iterator_as_text_list. * src/server/connections.h (Result_holder): The l2g_iterator_as_text_list member is now of type L2g_iterator instead of the typedef L2g_iterator_as_text_list. * src/include/services.h (get_created_texts): Use L2g_iterator instead of L2g_iterator_as_text_list. (get_map): Likewise. * src/include/kom-types.h (L2g_iterator_as_text_list): Typedef removed. 1999-02-02 David Byers * src/server/aux-items.h (Aux_item_validation_data): New type. (Aux_item_validation_function): New type. (Aux_item_validator): New type. 1999-01-28 David Byers * src/server/prot-a-parse.c (prot_a_parse_aux_item_list): Check array size for -1. Check allocation of result. * src/server/person.c (mark_text): Return no-such-text if the user is not allowed to read the text (just like get-text-stat) (set_user_area): Return UNDEF_PERS, not UNDEF_CONF. * src/include/kom-errno.h (enum kom_errno): Define KOM_PERS_EXISTS. * src/server/person.c (create_person_generic): Return KOM_PERS_EXISTS instead of KOM_CONF_EXISTS 1999-01-27 David Byers * src/server/conference.c (do_create_conf): Don't just DIE if we fail to create a conference. Log a message and return an error. * src/server/person.c (create_person_generic): Don't just DIE if we fail to create a conference. Log a message and return an error. * src/server/ram-output.c (foutput_conference_2): Output a space before the l2g mapping. (foutput_person_2): Same thing here. 1999-01-26 David Byers * src/server/person.c (create_person_old): Add parameter in call to create_person. (create_person): Added flags parameter. (create_person_generic): Set the personal flags from the parameter. (set_pers_flags): New function to set the personal flags of a person. * src/server/fncdef.txt: Added set_pers_flags and added pers_flags argument to create_person. 1999-01-25 David Byers * doc/hacking.texi (Parsing Bit Fields): New section. * src/server/prot-a-parse.c (prot_a_parse_priv_bits): New function. New model for parsing bit fields that's really tolerant about the token length. Anything from one bit and up is cool. * src/server/prot-a-parse.h: Added prot_a_parse_priv_bits. * src/server/connections.h: Added pers_flags to Connection. * src/server/internal-connections.c (init_connection): Initializer pers_flags field. * src/server/prot-a-parse-arg-c.awk: Added pers_flags. * src/server/call-switch.awk: Added pers_flags. * src/server/person.c (set_user_area): Return KOM_UNDEF_CONF if the person is secret. * src/server/conference.c (get_conf_stat_old): Check access with <= none and not == none. (get_conf_stat_older): Same here. * src/server/person.c (get_person_stat): Check access with <= none and not == none (get_person_stat_old): Same here. (get_created_texts): Same here. (map_created_texts): Same here. 1999-01-24 David Byers * src/server/connections.c (login_request): Use param.nologin_file instead of hard-coded path. * doc/lyskomd.texi (Parameters): Documented Nologin file * src/server/server-config.c: Added "Nologin file" * src/server/param.h: Added nologin_file. * src/server/conference.c (legal_name): Return bad-name on attempt to use null string. * src/server/log.c (restart_kom): Do normal exit if AVOID_ABORTS is defined. * acconfig.h: Added AVOID_ABORTS * configure.in: Define AVOID_ABORTS when the user says --with-gcov * src/server/conf-file.c (configure_line): Complain about too many assignments at one too many assignments, not two too many. * src/server/simple-cache.c (sync_part): Don't save if param.never_save is set. * src/server/server-config.c: Compile in never_save always. 1999-01-23 David Byers * src/server/session.c (set_client_version): Use client_data_len as max length for client version and client name. * doc/lyskomd.texi (Parameters): Documented max client data length. * src/server/param.h: Added client_data_len. * src/server/server-config.c: Added max client data length. * src/server/text.c (submit_to): Set err-stat to the last conf in the chain, not zero, if we hit the top of the super-conf chain without finding something we can write to. (sub_recipient): Check for access to the supposed recipient before checking if it is a recipient. This plugs two leaks of secret information. (add_footnote): Set err-stat to footnote when failing because of not being author to footnote. (check_comm): Don't set err-stat. The caller will. 1999-01-22 David Byers * src/server/text.c (create_text_check_misc): Return no-such-text if no read access to footnoted text. Check read access before checking anything else to avoid leaking secret information. * src/server/membership.c (fast_access_perm): fast_access_perm always returned read_protected for rd_prot conferences, even if the viewer was the supervisor. Fixed. * src/server/text.c (text_read_access): If an open conf is a bcc recpt, anyone can see the text. * doc/Protocol-A.texi (add-recipient): Added error code access-denied. * src/server/text.c (create_text_check_misc): Don't set kom_errno if it was set in submit_to. (submit_to): Set kom_errno here instead of in the caller. (add_recipient): Return KOM_ACCESS if we are not allowed to write to the target conference. * doc/Protocol-A.texi (Error Codes): Fxied speling error 1999-01-21 David Byers * src/server/text.c (recp_sent_by): Fixed error message. (do_create_text): Fixed speling erorr * doc/lyskomd.texi (Parameters): Added documentation for max conferences and max texts. 1999-01-19 David Byers * src/server/text.c (do_create_text): Pass time to create_text_add_miscs to ensure correct timestamp. (create_text_add_miscs): Set last_written to correct timestamp. * src/server/conf-file.c (assign_ulong): New function. * run-support/config: Added max_confs and max_texts to default config file. Remove compiled-in size limits. * src/server/dbck-cache.c (init_cache): Dynamically allocate pers_arr, conf_arr, text_arr and name_list. * src/server/dbck.c: Dynamically alloc person_scratchpad in init_person_scratchpad. * src/server/simple-cache.c (init_cache): Allocate the small_conf_arr. (cached_create_conf): Use param.max_conf, not MAX_CONF (cached_create_text): Use param.max_text, not MAX_TEXT (init_cache): Use param.max_conf and param.max_text, not MAX_CONF and MAX_TEXT * src/server/aux-items.c: Moved initialization of sent_at to prepare_aux_item_list from other functions. * src/server/log.h: Changed names from log to kom_log to avoid shadowing log in math.h. 1999-01-18 David Byers * src/server/testsuite/config/unix.exp (suspend_client): New function. Suspends reading from lyskomd. (resume_client): New function. Resumes reading. * src/server/testsuite/.cvsignore: Added .da, .bb, .bbg and .da files. * src/libraries/libansi/.cvsignore: Added .da, .bb, .bbg and .da files. * src/libraries/libmisc/.cvsignore: Added .da, .bb, .bbg and .da files. 1999-01-17 David Byers * src/server/conference.c: Don't allow change to forbid_secret if there are secret members. * src/server/testsuite/tcpconnect.py (fdset): Added command #suspend socket to stop the relay from reading from the socket, to simulate a communications failure of sorts. Added #resume socket to reopen communications. 1999-01-16 David Byers * src/server/debug.c: New file. (get_memory_info): Moved here from admin.c. * src/server/Makefile.am (ATOMS): Added debug.c * src/server/person.c (create_person_generic): Don't autologin unless do_auto_login is true (create_person_old): Set do_auto_login to true in call to create_person_generic. (create_person): Set do_auto_login to false in call to create_person_generic. * src/server/connections.c (logout_client): Send async logout if the session is not logged in. 1999-01-15 David Byers * src/server/send-async.c (async_new_name): Send new-name only to clients with the appropriate privileges. * src/server/membership.c (fast_access_perm): Only check priv bits if the viewer is ACTPERS or ACT_P (access_perm): Ditto. * src/server/manipulate.h (ENA_C): New macro. * configure.in: New argument --with-optimization * src/server/conference.c (legal_name): Set err_stat when returning KOM_LONG_STR. * src/server/text.c (do_create_text): Set err_stat when returning KOM_LONG_STR. * src/server/aux-item-def.y: Never add disabled items to the definition list. * src/server/admin.c (send_message): Set err_stat to param.broadcast_len. 1999-01-14 David Byers * src/server/connections.h: Added Memory_info to Res_type and Result_holder to be compiled if DEBUG_CALLS is defined. * src/server/admin.c (debug_info): New function to get memory usage stats. * src/server/prot-a.c (prot_a_reply): Output memory_info * configure.in: Check for mallinfo if we do debug calls. Substitute EFENCE=1 if we use efence. * src/server/session.c (who_is_on): Changed for loops to while loops to deal with new semantics of session 0 and to make the code clearer. (who_is_on_ident): Ditto. (who_is_on_dynamic): Ditto. (who_is_on_old): Ditto. * src/server/internal-connections.c (get_conn_by_number): Always interpred session 0 as the current session. (traverse_connections): Explicit check for session_no == 0 since change in get_conn_by_number. * src/server/session.c (disconnect): disconnect(0) disconnects the current session Did some work on mail import and export (that jsk should have taken care of. Grrrr....) * doc/Protocol-A.texi (Predefined Aux-Item Types): Rewrote documentation for mail import and export aux-items. Wrote a chapter on mail import and export. * run-support/aux-items.conf: Added aux-items for mail import and export. * doc/Protocol-A.texi: Removed all @codes surrounding cross-references since texinfo chokes on them. * doc/hacking.texi (Notes for fncdef.txt): Added notes on fncdef.txt. 1999-01-13 David Byers Handle #ifdef/#endif and empty lines in fncdef.txt * src/server/fncdef.txt: Added debug_info. This call does NOTHING at the moment. It is just a proof of concept. It will do stuff later. * src/server/prot-a-parse-arg-h.awk: Handle #ifdef and #endif and empty lines. * src/server/fnc-def-init.awk: Ditto. * src/server/prot-a-is-legal-fnc.awk: Ditto. * src/server/call-switch.awk: Ditto. * src/server/prot-a-parse-arg-c.awk: Ditto. * src/server/com-h.awk: Ditto. * acconfig.h: Added DEBUG_CALLS * configure.in: Added option --with-efence to link with efence. Added option --with-debug-calls to define DEBUG_CALLS when compiling. Arranged things so we have to put a call number into the fncdef.txt file. This makes call numbers more explicit. It is also possible to have non-contiguous call numbers. * src/server/prot-a.c (prot_a_parse_packet): Use function_index field of connection to access parsers etc. * src/server/connections.c: Added num_fnc_defs * src/server/prot-a-parse-arg-h.awk: Updated for new format. * src/server/connections.c (dump_statistics): Changed the format of the statistics file to output function number before the call number. * src/server/connections.h: New field function_index Added function field to Fnc_descriptor. * src/server/call-switch.awk: Updated for new format in fncdef.txt * src/server/com-h.awk: Updated for new format in fncdef.txt * src/server/prot-a-parse-arg-c.awk: Updated for new format in fncdef.txt. * src/server/prot-a.c (prot_a_is_legal_fnc): Removed hard-coded switch and replaced it with include of prot-a-is-legal-fnc.incl * src/server/prot-a-is-legal-fnc.awk: New function. * src/server/Makefile.am: Add rules for prot-a-is-legal-fnc.incl 1999-01-12 David Byers * 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 * db-crypt/db/lyskomd-data: Updated database with keep_commented field. 1999-01-07 David Byers * 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 avoid 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 Use NO_TIME instead of 0. * src/server/memory.c (init_membership): Use NO_TIME instead of 0. 1998-12-31 Per Cederqvist Avoid pty buffer size overflow in the test suite. * src/server/testsuite/lyskomd.0/03.exp: Split long lines so that at most approximately 250 bytes are sent via a pty. Many operating systems have a limit of approximately 256 bytes per line. Fix test suite typo. * src/server/testsuite/config/leaks.exp (check_usage): Fixed a typo: it is an error if the number of strings is use change, not if they stay the same. Ignore some generated files. * src/server/testsuite/.cvsignore: Ignore lyskomd.*.base, lyskomd.*.usage and usage-base.tmp. * .cvsignore: Ignore config.h, config.h.in, stamp-h and stamp-h.in. 1998-12-30 David Byers * 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 * src/server/testsuite/config/unix.exp (lyskomd_start): Added optional third argument for stuff to put at the end of the config file. * src/server/prot-a-send-async.c (prot_a_async_new_membership): Send the correct header. * src/server/membership.c (add_member_common): Added calls to send_async_new_membership. (send_async_new_membership): Send message to the right recipients. 1998-12-28 David Byers * src/server/membership.c (add_member_old): Don't set invitation bit here. It is dealt with in add_member_common. (do_change_priority): Don't change priority to zero if we are being called from old functions. Just fake the passive bit. (locate_membership_and_position): Return the correct position of the membership. 1998-12-27 David Byers * doc/Protocol-A.texi (Error Codes): Added invalid-membership-type. 1998-12-26 David Byers * doc/man/lyskomd.8 (value): Documented regexps use collate table. * src/server/param.h: Added regex_use_collate_table. * src/server/server-config.c: Added regexps use collate table. * src/server/regex-match.c (lookup_regexp): Set translation table for regex according to regex_use_collate_table option. * src/server/manipulate.h: New function declaration. * src/server/membership.c (locate_membership_and_position): New function. (locate_membership): Use it. * src/server/person.c (do_query_read_texts): New function. (query_read_texts_old): Use it. (query_read_texts): Use it. * src/server/prot-a-output.h(prot_a_output_extended_membership): New function declaration. * src/server/prot-a-output.c (prot_a_output_extended_membership): New function. * src/server/prot-a.c (prot_a_reply): Added rt_extended_membership. * src/include/kom-types.h: New type Extended_Membership. * src/server/connections.h: Added extended_membership to Result_holder. Added rt_extended_membership to Res_type * src/include/services.h: Declare query_read_texts to take an Extended_Membership * doc/Protocol-A.texi (query-read-texts): Documented that this function returns the position as well as the membership. 1998-12-25 David Byers * README: Updated clients information. * src/server/membership.c (set_membership_type): Removed F-word from comment. Inserted F-abbreviation instead :-) * src/server/conference.c (get_uconf_stat): Removed FIXME after fixing fast_access_perm. * src/server/membership.c (fast_access_perm): Set kom_errno if we can't find the conference conf_no. * src/server/membership.c (do_get_members): Don't filter secret memberships if we have privilege bits set. * doc/Protocol-A.texi (Error Codes): Fixed error in documentation of secret-public 1998-12-24 David Byers * src/server/aux-items.c (system_add_aux_item_list): Call add triggers (check_delete_aux_item_list): Return KOM_AUX_PERM if an item to delete is mission. This is in accordance with the documentation. * src/server/aux-items.h (INFO_OBJECT_TYPE): New constant. 1998-12-23 David Byers * src/server/testsuite/lyskomd.0/03.exp: Updated test 1010 for item 27. Updated test 1017 for asyncs 16, 17 and 18 Updated test 1020 for asyncs 16, 17 and 18 Updated test 1022 for asyncs 16, 17 and 18 Updated test 1024 for asyncs 16, 17 and 18 In test 1032 updated async messages to show the bcc recpt. This is because of the change to make bcc recpts visible to the creator and to all when target is an open conference. Added sleep 2 before test 1310. Otherwise test 1311 may fail since one of the clients has not been idle for long enough (lyskomd is OK.) Updated test 1333 to not show deleted items Similar in 1334, 1335 and 1339. * src/server/testsuite/lyskomd.0/01.exp: Updated query-predefined-aux-items test for item 27 1998-12-22 David Byers * src/server/conf-file.c (MAXLINE): Increased line length limit to 1000 characters 1998-12-22 Per Cederqvist One more test. * src/server/testsuite/lyskomd.0/03.exp: Test call 99. 1998-12-20 Per Cederqvist More tests. * src/server/testsuite/lyskomd.0/03.exp: Test call 95-98. Speed up regexp matching a little. * src/server/regex-match.c (lookup_regexp): Attempt to allocate a fastmap. The invitation bit should not be set when a user himself joins a conference. * src/server/membership.c (add_member_old): Never set the invitation bit when a user adds himself to a conference. Avoid too long lines in the documentation. * doc/Protocol-A.texi (modify-system-info): Remove whitespace to avoid too long lines in the generated info file. 1998-12-17 David Byers * src/server/testsuite/config/Makefile.am (lyskomd-config): Use aux-items.conf in this directory instead of in run-support. * src/server/text.c (modify_text_info): Call commit_aux_item_list. * src/server/conference.c (modify_conf_info): Call commit_auc_item_list. * src/server/admin.c (modify_server_info): Call commit_aux_item_list. * src/server/aux-items.c (commit_aux_item_list): New function to really delete aux_items. 1998-11-14 Per Cederqvist Fixed another uninitialized memory problem: the allow_anon, reserved1, reserved2 and reserved3 bits of the Conf_type was not always properly initialized. * src/server/person.c (create_person_generic): Initialize allow_anon, reserved1, reserved2, and reserved3. * src/server/memory.c (init_conf_type): Initialize allow_anon, reserved1, reserved2, and reserved3. * src/server/prot-a-parse.c (prot_a_parse_conf_type): Let allow_anon default to 1, not 0. We really should have a way to let it default to unset, so that a set-conf-type that only specifies four bits doesn't alter the remaining bits. * src/server/testsuite/lyskomd.0/03.exp: Set allow_anon, and expect it to be set. Test call 92-94. 1998-11-09 Per Cederqvist Fixed an uninitialized memory problem. * src/server/memory.c (init_conference): Initialize highest_aux and expire to 0. * src/server/conference.c (do_create_conf): Initialize expire to 0. Avoid symbols with global linkage. * src/server/aux-items.c (aux_item_triggers): Now static. One more test case. * src/server/testsuite/lyskomd.0/03.exp: Test call 91. 1998-11-09 Per Cederqvist More test cases. * src/server/testsuite/lyskomd.0/03.exp: Test calls 86-90. Minor fixes to the documentation. * doc/Protocol-A.texi (create-text): This call can never generate the error ``anonymous-rejected''. (create-anonymous-text): Avoid too long lines. 1998-10-22 Per Cederqvist More test cases. * src/server/testsuite/config/unix.exp (extracting_expect): New proc. * src/server/testsuite/lyskomd.0/03.exp: Test call 46-85. * src/server/testsuite/renumber.el (renumber-lyskom-send-simple-expect): Handle extracting_expect. Only allow one call to set-client-version. * src/include/kom-errno.h (KOM_CLIENT_IS_CRAZY): Old favourite resurrected. * src/server/session.c (set_client_version): Fail if the client version already was set. Allow set-info with motd_of_lyskom set to 0. * src/server/admin.c (set_info): Allow motd_of_lyskom to be 0. Fixed the error-status of find-previous-text-no. * src/server/text.c (greater): Added const qualifier. (find_previous_text_no): Fixed the returned error status. * src/server/testsuite/lyskomd.0/01.exp: Adjusted to the error status that is now returned by the bug-fixed find_previous_text_no. Documentation fixes and updates. * doc/Protocol-A.texi (send-message): Document that recipient 0 means that the message is sent to all sessions. (get-last-text): Say that this relies on all texts being written in chronological order. (set-client-version): This call can only be used once per session. It will return client-is-crazy if used twice. (get-client-version): This was called "get-client-name". (mark-text): Bogus example fixed. (unmark-text): Bogus example fixed. (lookup-z-name): The want-pers and want-confs arguments were swapped in the function header. (set-info): Document that lyskomd 1.9.0 erroneously returned text-zero if MOTD was 0. 1998-10-17 Per Cederqvist More tests. * src/server/testsuite/lyskomd.0/03.exp: Test call 30-45. Fixed a memory corruption problem. * src/server/memory.c (copy_conference): Fixed a memory corruption problem that was introduced when Local_to_global was introduced. (copy_person): Likewise. (copy_text_stat): Added a const qualifier. Rewritten to decrease the probability that the same kind of bug is introduced here, that is, assign each field separately instead of assigning the entire struct at once. (copy_aux_item_list): Now static. Rewritten as above. (coy_aux_item): Added const qualifier. Rewritten as above. * src/server/kom-memory.h (copy-person): Added const qualifier. (copy_text_stat): Likewise. (copy_aux_item): Likewise. (copy_aux_item_list): Removed (now static). Minor fixes to the documentation. * doc/Protocol-A.texi (Predefined Aux-Item Types): Fixed a Texinfo syntax error. (sync-kom): Fixed bugs in the example. 1998-10-16 Per Cederqvist More tests. * src/server/testsuite/lyskomd.0/03.exp: Test call 27-29, 40. 1998-10-14 Per Cederqvist More test cases. * src/server/testsuite/lyskomd.0/03.exp: Test calls 8-27, 50, 78. * src/server/testsuite/lyskomd.0/summarize.sh: New file. Fixed bug in mark_as_read. * src/server/membership.c (adjust_read): Fixed a fence-post error that was introduced when Local_to_global was introduced. Clarify the documentation. Change the specification of async-leave-conf. * doc/Protocol-A.texi (delete-conf): State the mailboxes can be removed. (get-conf-stat-older): Document the mask argument. (mark-text-old): Document that mark-type 0 is used to remove the mark. (async-leave-conf): This message is always sent to a person when that person ceases to be a member of a conference, whatever the reason is. The protocol specification used to say that it was only sent when a person was forced to leave a conference. The current wording makes more sense, and it was also the implemented behavior, so update the specification rather than the program. 1998-10-12 David Byers * src/libraries/libcommon/Makefile.am (INCLUDES): Added -DSERVER as in src/server 1998-10-11 Jonas S Karlsson Aux-info defined for import/export of emails. These are preliminary. but will be improved. * doc/Protocol-A.texi: email aux-infos x-XXX 1998-10-11 Per Cederqvist Keep an extra copy of the database, just in case. Do some sanity checking when copying file contents. * src/server/simple-cache.c (pre_sync): Store the previous backup file. (copy_file): Abort if we cannot seek or read the file we copy from. Abort if the value we read didn't end in a newline, start with "T ", "C " or "P ", if the identity number in the data isn't what we expected, or if it isn't followed by a space. This change attempts to detect file damage as early as possible. * src/server/server-config.c (parameters): Added "Backup file 2". (read_configuration): Handle backupfile_name_2. * src/server/ramkomd.c (init_data_base): Print backupfile_name_2. * src/server/param.h (struct kom_par): Added backupfile_name_2. * src/server/dbck-cache.c (cache_sync): Store the previous backup file. * doc/man/lyskomd.8: Added "Backup file 2". Allow compaction of the text file even if there are errors in the data base. * src/server/dbck.c (main): Allow -g even if errors occured, but only if the user confirms. 1998-10-11 Per Cederqvist More test cases. * src/server/testsuite/lyskomd.0/03.exp: Test call 4-7. 1998-10-09 Per Cederqvist Commit some Emacs support code for test script writers. * src/server/testsuite/renumber.el: New file. (renumber-lyskom-send-simple-expect): New function. 1998-10-08 Per Cederqvist More test cases. * src/server/testsuite/lyskomd.0/03.exp: Test call 0, 1, 2 and 3. * doc/Protocol-A.texi (login-old): The error-status indicates the person number when invalid-password is returned. 1998-10-08 David Byers * src/server/prot-a-output.c (prot_a_output_membership): Output break_type. * src/server/ram-output.c (foutput_membership_2): Output break_type. * src/server/ram-parse.c (fparse_membership_2): Parse break_type. 1998-10-07 David Byers * src/server/text.c (recp_sent_by): New function. (filter_secret_info): Let the sender of a bcc see a bcc and let bccs to open conferences be visible to all. 1998-10-06 David Byers * src/server/send-async.c (async_new_membership): New function. (async_sub_recipient): Ditto. (async_new_recipient): Ditto. * src/server/prot-a-send-async.c (prot_a_async_new_membership): New function. (prot_a_async_sub_recipient): Ditto. (prot_a_async_new_recipient): Ditto. * src/server/text.c (send_async_add_recipient): New function. (add_recipient): Send async-new-recipient (send_async_sub_recipient): New function. (do_sub_recpt): Send async-sub-recipient. * src/server/membership.c (send_async_new_membership): New function. (add_member_common): Send async-new-membership 1998-10-06 Per Cederqvist Document bcc-recpt. A created person is a member of his mailbox. * doc/Protocol-A.texi (The Misc-Info List): Document blank carbon copies. (create-person-old): Document that the new person will be a member of his letterbox. (create-person): Likewise. Clarify the documentation about accept_async and make the implementation conform to the documentation. * src/server/session.c (accept_async): Don't accept 1, 2, 3, 4 or 10 (which are in the interval [0..ay_dummy_last) but not used). Complain about the first rejected async number, not the last. * doc/Protocol-A.texi (query-async): Added a reference to the currently preselected asynchronous messages, since the example is valid for lyskomd 1.9 but not lyskomd 2.0. (Asynchronous Messages): Encourage clients to use accept-async instead of trusting the defaults. State that the obsolete calls may be non-existing. More test cases. * src/server/testsuite/lyskomd.0/03.exp: New file. * src/server/testsuite/lyskomd.0/01.exp: Use read_versions instead of duplicating code. * src/server/testsuite/config/unix.exp (read_versions): New function, extracted from ../lyskomd.0/01.exp. Makefile improvements. * src/server/testsuite/Makefile.am (MOSTLYCLEANFILES): Added *.sum and *.log. (check-l2g): New name for former target l2g_check. (check-lyskomd): New name for former target lyskomd_check. Remove some unused code. * src/libraries/libcommon/kom-errno.c (kom_perror): Was unused. Removed. * src/include/config.h (kom_errout): Was unused. Removed. 1998-10-04 David Byers * configure.in: Output to include/config.h * src/server/aux-items.c (delete_aux_item_list): Call undelete triggers. * src/server/dbck.c: Moved BUGDECL to top level. * src/server/internal-connections.c (init_connection): Cast in comparisons to get rid of compiler warnings. * src/server/text-garb.c: Moved BUGDECL to top level. * src/server/person.c: Moved BUGDECL to top level. * src/server/conference.c: Moved BUGDECL to top level. * src/server/membership.c (do_change_priority): Only fake the passive flag when fake_passive is true. * src/server/connections.c (dump_statistics): Remove compiler warnings by casting in comparisons. * src/include/kom-types.h: Declared fields of Version_info_internal const to get rid of compiler warnings (plus, it makes sense.) * src/server/simple-cache.c (cached_get_text): Remove compiler warnings by casting in comparisons. * src/include/server/smalloc.h (SMALLOC_MAGIC_FREE): Declare constants as unsigned to avoid compiler warnings. * src/server/ram-parse.c (fparse_string): Remove compiler warnings by casting in comparisons. * src/server/local-to-global.c (find_block): Removed const declarations to get rid of compiler warnings (it was cast away anyway.) * src/libraries/libcommon/kom-errno.c: Include kom-config * src/server/admin.c: Conditionally include config.h * src/server/dbck.c (check_membership): Check duplicated info between member and membership records. Redeclared mship param as non-const. 1998-10-04 Per Cederqvist * TODO: New file. 1998-08-31 Per Cederqvist Added more tests and documentation. * doc/Protocol-A.texi (get-text): Uses the text-zero error code. (get-text-stat-old): Likewise. (get-text-stat): Likewise. * src/server/testsuite/lyskomd.0/02.exp: Added tests for get-text-stat and get-text-stat-old. Check that a text wiht one public and one secret recipient is properly filtered. 1998-08-30 Per Cederqvist query-predefined-aux-items was broken. * src/server/aux-items.c (query_predefined_aux_items): Added a missing statement so that the next link really is followed. Added more tests and documentation. * src/server/testsuite/lyskomd.0/01.exp: Added tests for requests 89-104. * doc/Protocol-A.texi (get-conf-stat): Removed a note that said that only the old bits of the Any-Conf-Type are returned by this call. (Protocol Requests): 47 is obsoleted by 104. (get-created-texts): 47 is obsoleted by 104. (set-membership-type): Document the login-first error code. (local-to-global): Likewise. (map-created-texts): New node. More documentation is needed here. 1998-08-29 Per Cederqvist Introduce Aux-Item-Input in the protocol spec. (It is a subset of Aux-Item.) Don't include aux_no in it. * src/server/testsuite/lyskomd.0/00.exp: Don't send the aux_no field in Aux-Item-Input data. * src/server/prot-a-parse.c (prot_a_parse_aux_item): Don't expect the aux_no field. Leave that field as garbage. * doc/Protocol-A.texi (LysKOM Data Types): Added Aux-Item-Input. Removed the '<10>' indicator in the Text-Stat declaration. (create-text): Use type Aux-Item-Input for input parameters. (create-anonymous-text): Likewise. (create-conf): Likewise. (create-person): Likewise. (modify-text-info): Likewise. (modify-conf-info): Likewise. (modify-system-info): Likewise. Clean up Protocol-A.texi. * doc/Makefile.am (protocol-a.info): Don't allow tabs in the document. * doc/Protocol-A.texi: Write all types as "Foo-Bar", never "Foo-bar". Don't use tabs. (Notation): Be explicit about how types are written. Misc documentation fixes. * doc/Protocol-A.texi (who-is-on-ident): Corrected the return type to ARRAY Who-Info-Ident. (modify-system-info): Changed the type of the times-to-delete argument from the undefined type Number-List to ARRAY Aux-No. (set-info): This accepts an Info-Old, not an Info. 1998-08-29 Per Cederqvist Fixed a memory problem in get_collate_table. * src/server/admin.c (get_collate_table): The result contains garbage on entry, so don't call s_clear() on it. Added more tests and documentation. * src/server/testsuite/lyskomd.0/01.exp: Read $top_srcdir/versions instead of ../version.incl, so the script gets all the versions. Added tests for requests 63-88. * src/server/testsuite/Makefile.am (site.exp): Depends on Makefile. Set top_srcdir, but not srcdir. (srcdir can still be used in the test scripts, since runtest sets it when the --srcdir option is used.) * doc/Protocol-A.texi (LysKOM Data Types): The invisible bit is always set for sessions where no-one is logged on. (who-is-on-dynamic): Likewise. (set-info): The version number was missing from the example. (create-conf): Indentation fixes. 1998-08-28 David Kågedal * doc/Protocol-A.texi: Cleaned up the call definitions. Removed all type synonyms for ARRAY types. Conference had an extra 'type' field. 1998-08-28 Per Cederqvist Added more tests and documentation. * src/server/testsuite/lyskomd.0/01.exp: Added tests for requests 51-62. * doc/Protocol-A.texi (LysKOM Data Types): The order of the elements in Who-Innfo-Old was wrong. The same bug existed at least as far back as in the prot-A.txt file that was distributed with the 1.7.0 server. I find it better to change the documentation than the code. (create-person-old): Document the auto-login feature. (who-is-on): Clarify which sessions that are returned. (get-unread-confs): Clarify that this request may return extra conferences. This request may not be made before you log in. 1998-08-27 Per Cederqvist Added more tests and documentation. * src/server/testsuite/lyskomd.0/01.exp: Added tests for requests 42-50. * doc/Protocol-A.texi (LysKOM Data Types): Removed Member-Old and Member-List-Old. (shutdown-kom): exit-val is an argument to the request, not the result from the request. (get-members-old): Simplified the return value to "ARRAY Pers-No" instead of "Member-List-Old". Explicitly state that the returned list is truncated if there are too few members of the conference. 1998-08-25 Per Cederqvist The request 36=get-info was broken. * src/server/fncdef.txt (get_info_old): Returns an info_old, not an info. Added more tests and documentation. * src/server/testsuite/lyskomd.0/01.exp: Added tests for requests 32-41. * doc/Protocol-A.texi (LysKOM Data Types): Document the aux-item-list part of the Info structure. (who-is-on-old): Document that the returned list contains only sessions that are logged in visibly. 1998-08-25 Per Cederqvist Documentation fixes: async-login was wrong. * doc/Protocol-A.texi (LysKOM Data Types): Added Any-Conf-Type to the type index. (get-text): Never fails with login-first. The no-such-text error is used when the user isn't logged in. (get-text-stat-old): Likewise. (get-text-stat): Likewise. (async-login): This async message includes a session number. More test cases added. * src/server/testsuite/config/unix.exp (any_num): New constant. (lyskomd_start): Increase the timeout around the start of lyskomd, since it can take quite a while on slow computers. * src/server/testsuite/lyskomd.0/01.exp: Added tests of more requests. * src/server/testsuite/lyskomd.0/02.exp: New file. * src/server/testsuite/Makefile.am (lyskomd_check): Added a missing quote character. 1998-08-23 Per Cederqvist Fixed the documentation of 12=lookup-name. * doc/Protocol-A.texi (LysKOM Data Types): Documented Conf-List-Archaic. (lookup-name): This request returns a Conf-List-Archaic, not a Conf-No-List. Added an example. 1998-08-22 Per Cederqvist Document more of the used error codes. * doc/Protocol-A.texi (get-person-stat-old): Added error code `login-first'. (login): Added error code `conference-zero'. (Error Codes): Renamed `illegal-password' to `invalid-password', which is the name the rest of the document uses. More test cases. * src/server/testsuite/lyskomd.0/01.exp: New test suite. * src/server/testsuite/config/unix.exp (lyskomd_start): Create a fresh database before starting lyskomd. * src/server/testsuite/Makefile.am (lyskomd_check): Don't create the database before running the lyskomd tests. Fixed bugs from the Local_to_global introduction. * src/server/membership.c (adjust_read): Fixed a fencepost error that was introduced 1998-07-26. * src/server/ram-output.c (foutput_text_list): Handle empty text lists properly. * src/server/prot-a-output.c (prot_a_output_person): Handle empty Local_to_global structures properly. (prot_a_output_conference): Likewise. (prot_a_output_conference_old): Likewise. * src/server/ram-output.c (foutput_text_list): Handle empty text lists that once was non-empty properly. Added indices to the protocol specification. * doc/Protocol-A.texi: Added a Request Index and a Type Index. Eliminated a race condition in the test case. * src/server/testsuite/config/unix.exp (lyskomd_death): Synchronize with the lyskomd process so that it dies at a proper time. * src/server/ramkomd.c (main): Don't terminate until a confirmation is read on stdin when running under DejaGnu. Implemented map_created_texts. * src/include/services.h (map_created_texts): New function. * src/server/person.c (map_created_texts): New function. * src/server/fncdef.txt: Added map_created_texts. * src/server/prot-a.c (prot_a_is_legal_fnc): Added call_fnc_map_created_texts. * src/server/testsuite/lyskomd.0/00.exp: Added test cases for map_created_texts. 1998-08-16 Per Cederqvist Documented all undocumented Aux-Items. * doc/Protocol-A.texi (Predefined Aux-Item Types): Documented aux-items 13, 14 and 15. 1998-08-14 Per Cederqvist The cache tried to free person, text and conference 0 during server shutdown. * src/server/simple-cache.c (free_all_cache): Don't attempt to access Pers_no, Conf_no or Text_no 0. (get_conf_node): Fail if the argument is less than 1. (get_pers_node): Likewise. (get_text_node): Likewise. (traverse_person): Unused function; don't compile it. * run-support/aux-items.conf (creating-software): New aux-info. 1998-08-10 Per Cederqvist Ported the test suite to DejaGnu 1.2. * src/server/testsuite/config/unix.exp (lyskomd_start): Added missing global declarations. (l2g_start): Likewise. 1998-08-10 Per Cederqvist Typo in a Makefile.am fixed. * src/server/testsuite/config/Makefile.am (lyskomd-config): Added a missing quote. 1998-08-09 Per Cederqvist Fixed bugs in get_created_texts. * src/server/person.c (get_created_texts): Fixed a fencepost error and two other errors, all introduced 1998-07-26. Test suite improvements. * src/server/testsuite/lyskomd.0/00.exp: Added more tests. Added tests for get-created-texts. * src/server/testsuite/l2g.0/10.exp: New file. * src/server/testsuite/config/unix.exp (l2g_stop): Send a quit command to test-l2g, so that we can be sure that the test case doesn't miss some unexpected final output from the test program. (unanchored_expect): Fixed an error message. * src/server/testsuite/test-l2g.c (main): Added 'q' (quit) command. Fixed more bugs in get_map. * src/server/text.c (get_map): Set result.first_local_no correctly if the map in the conference is completely empty. * src/server/prot-a-output.c (prot_a_output_l2g_iterator_as_text_list): Don't forget to emit trailing zeroes in the text-list. Document some previously undocumented behavior of get-map and get-created-texts. * doc/Protocol-A.texi (get-map): Document what happens when attempting to retrieve texts before the start of the map. (get-created-texts): Likewise. The L2g_iterator sometimes iterated past the end of a bounded search. * src/server/local-to-global.c (l2gi_searchsome): Set search_ended correctly when the end is set so that the iterator will loop over nothing, even though later texts exists. Let automake generate the INSTALL file. * README: Include the contents of the INSTALL file. This file needs a major overhaul. * mkmi: Remove INSTALL and expect automake to recreate it. Removed GNU malloc. The integration was poor, to say the least, and it was not generally an improvement to use GNU malloc. * src/server/testsuite/Makefile.am: Removed references to gnumalloc. * src/server/Makefile.am: Removed reference to gnumalloc. * src/libraries/Makefile.am (SUBDIRS): Removed @GNUMALLOC@. * INSTALL: Don't mention GNU malloc. * configure.in: --with-gnu-malloc: flag removed. Don't substitute GNUMALLOC. Don't define USE_GNU_MALLOC or USING_GNU_MALLOC. Don't use the following that was only used because of GNU malloc: SUNOS_LOCALTIME_BUG, getpagesize, memmove, AC_USG. Don't attempt to create src/libraries/gnumalloc/Makefile. * src/libraries/gnumalloc: All files in this directory removed. Added sanity check to local_to_global. * src/server/text.c (local_to_global): Check that the no_of_texts argument isn't larger than 255. 1998-08-08 Per Cederqvist Fixed a protocol error with async_deleted_text. * src/server/prot-a-send-async.c (prot_a_async_deleted_text): Fixed the size in the header. This emits 18 elements, not 16. Minor documentation fixes. * doc/aux-info.doc: Document dont-garb. * doc/Protocol-A.texi: Spell checking performed. Some other minor typos fixed. State that the aux-item read-confirm should only be added after the user has acknowledged that he has read the text. (accept-async): Moved some text that belonged here from the query-async node. The error-status indicates the first offending number, not the index of the first offending number, when unknown-async is returnd. Fixed bugs in get_map and local_to_global. * src/server/text.c (get_map): Fixed a couple of fence errors. (local_to_global): Using first_local_no==0 is an error. Fixed a fence error. * src/server/prot-a-output.c (prot_a_output_text_mapping): Emit "0" or "1", not "48" or "49", as the later-texts-exists flag. Fixed a bug that could cause much too much data to be written. Fixed bugs and made improvements to the test cases for get_map and local_to_global. * src/server/testsuite/lyskomd.0/00.exp: Many bugs fixed. Several tests added. * src/server/testsuite/config/unix.exp (attach): New constant. (line_leader): New variable. (meta_line_leader): New variable. (l2g_start): Set l2g_id, expect_active and expect_always. (fix_expect_after): New proc. (simple_expect): New argument: meta. Handle line leaders. Removed tests for unexpected lines, which should now be handled via expect_active. (unanchored_expect): Added missing quotes. (lyskomd_start): Handle attach. Set expect_active and expect_always to something sane. (client_start): Use tcpconnect.py and line leaders to make it easier to debug the test cases. Set expect_active and expect_always to something sane. (talk_to): Handle l2g. Handle line leaders. Call fix_expect_after. (client_death): New proc. * src/server/testsuite/tcpconnect.py: New file. * src/server/testsuite/Makefile.am (../lyskomd): New target. (lyskomd_check): Depend on ../lyskomd. (site.exp): Added srcdir. (EXTRA_DIST): Added tcpconnect.py. * src/server/Makefile.am (all-recursive check-recursive): Depend on lyskomd. Read the file name of the "Aux-item definition file" from the config file, not from the command line. * src/server/testsuite/config/Makefile.am (lyskomd-config): Added "Aux-item definition file". * src/server/server-config.c (parameters): Added "Aux-item definition file". (AUX_DEF_FILE): Removed. (read_configuration): Handle aux_def_file just like all the other file names. * src/server/ramkomd.c (initialize): Removed the aux_def_file argument. All callers updated. Get the file of the aux_def_file from the config file. (main): Removed the -c and -a options. This reverts the change from Sat Sep 13 15:07:32 1997. It is more consistent to get the file name of the aux-def file from the config file. The -c option was buggy anyhow. * src/server/param.h (struct kom_par): Added aux_def_file. * doc/man/lyskomd.8: Removed the -c and -c flags. Added "Aux-item definition file". * src/include/config.h (AUX_DEF_FILE): Constant removed. Default to sending async_new_text_old and ay_leave_conf, but not async_new_text, just as the documentation says. * src/server/send-async.c (async_new_text_old): Use prot_a_async_new_text_old, not prot_a_async_new_text. * src/server/async.h (ASYNC_DEFAULT_MESSAGES): Added ay_new_text_old instead of ay_new_text. Added ay_leave_conf. Get rid of some compiler warnings. * src/server/rfc931.c (get_real_username): Mark unused arguments. * src/server/dbck-cache.c (cached_lock_person): Marked unused arguments. (cached_unlock_person): Likewise. (cached_lock_conf): Likewise. (cached_unlock_conf): Likewise. 1998-08-07 Per Cederqvist Merged old uncommitted changes to prot-A.txt. * doc/prot-A.txt: Error code 38=no-connect is no longer used. Documented 85=get-collate-table. Typo fixes. Facilitate testing of Local_to_global with Electric Fence. * src/server/testsuite/config/unix.exp (efence): New constant. (efence_blurb): New proc. (l2g_start): Handle an efence-instrumented test program if the global variable efence is true. Improved the documentation on the config file. * doc/man/lyskomd.8: Documented the values that you can pass to bool config parameters. 1998-08-06 Per Cederqvist Added the beginnings of a test suite for the complete lyskomd binary. * README: Talk a little about the test suite. * src/server/testsuite/Makefile.am (l2g_check): Added --srcdir to the runtest command line. (lyskomd_check): New target. * src/server/testsuite/Makefile.am (check): Added lyskomd_check. * src/server/testsuite/lyskomd.0/00.exp: New file. * src/server/testsuite/config/unix.exp: (hollerith): New constant. (maxint): New constant. (clientport): New constant. (muxport): New constant. (unanchored_expect): Continue with the expect if an unexpected line is detected. (lyskomd_start): New proc. (lyskomd_death): New proc. (client_start): New proc. (talk_to): New proc. (holl): New proc. * src/server/testsuite/config/Makefile.am (noinst_DATA): Added lyskomd-config. (lyskomd-config): New target. Regenerate protocol-a.info automatically. * doc/Makefile.am (protocol-a.info): Added an explicit rule because Automake 1.3 fails to add it automatically. 1998-08-05 Per Cederqvist Fixed the documentation for the local-to-global call. * doc/Protocol-A.texi (LysKOM Data Types): Changed the name of the type Local-To-Global_Result to Text-Mapping. All uses updated. Implemented the local-to-global call. * src/server/fncdef.txt: Added local_to_global. * src/include/services.h (local_to_global): New function. * src/include/kom-types.h (Text_mapping): New type. * src/server/text.c (get_map): Fixed the type of the no_of_texts argument. (local_to_global): New function. * src/server/prot-a.c (prot_a_reply): Handle rt_text_mapping. (prot_a_is_legal_fnc): Handle call_fnc_local_to_global. * src/server/prot-a-output.c (prot_a_output_text_mapping): New function. * src/server/prot-a-output.h: Likewise. * src/server/connections.h (Res_type): Added rt_text_mapping. (Result_holder): Added text_mapping. 1998-08-03 Per Cederqvist Document the local-to-global call. * doc/Protocol-A.texi (Articles): Refer to local-to-global instead of get-map. (LysKOM Data Types): Added subsection titled "Mapping Local to Global Text Numbers". (Protocol Requests): Mark get-map as obsolete, and refer to 103. Added 103=local-to-global. (get-map): This is superseded by local-to-global. (accept-async): Fixed typo. (local-to-global): New node. 1998-08-02 Per Cederqvist Generate and install protocol-a.info. * doc/Makefile.am (info_TEXINFOS): New target. Moved Protocol-A.texi here. (EXTRA_DIST): Moved Protocol-A.texi to info_TEXINFOS. * mkmi: Remove scripts/texinfo.tex and expect automake to regenerate it. Minor syntactic documentation fixes. * doc/Protocol-A.texi: Added @dircategory and @direntry commands. (Protocol Requests): Added set-membership-type to the menu. (set-membership-type): Minor typo fixed. (Top): State that this is a draft, and that the version numbers are wrong. 1998-07-27 Per Cederqvist Fixed a pointer bug in Local_to_global. * src/server/local-to-global.c (join_range): Fixed a bug where a pointer that pointed to the old position of a reallocated block was used. 1998-07-26 Per Cederqvist dbck can now read database format 2. * src/server/dbck-cache.c (init_cache): Handle database format 2. Fix the bootstrap database. * db-crypt/db/lyskomd-data: CONF-RECORD uses the Local_to_global structure. Remove all traces of the Text_list type. * src/include/kom-types.h (Text_list): Removed. * src/server/connections.h (Res_type): Removed rt_text_list. (Result_holder): Removed text_list. * src/server/prot-a-output.h (prot_a_output_text_list): Removed. * src/server/prot-a-output.c (prot_a_output_text_list): Removed. * src/server/prot-a.c (prot_a_reply): Don't attempt to handle rt_text_list. Code cleanup. * src/server/aux-item-def.y: Fixed indentation of include statements. * src/server/aux-item-def.lex.c: No longer kept under version control. Improve documentation. * doc/server.extend: Updated. Start using the Local_to_global structure. * doc/lyskomd-database-format (DATABASE VERSION 2): CONF-RECORD and PERS-RECORD uses the Local_to_global structure. * configure.in: Added AC_C_INLINE. * src/server/text.c (add_text_in_conf): Adjusted to the fact that the texts member of Conference is now a l2g. (do_sub_recpt): Likewise. (set_loc_no): Removed. (adjust_text_list): Removed. (do_delete_text): Adjusted to the fact that the created_texts member of Person is now a l2g. (do_create_text): Likewise. (get_map): The result argument now points to a l2g_iterator_as_text_list instead of a Text_list. Adjusted to the fact that the texts member of Conference is now a l2g. * src/server/simple-cache.c (mark_conference_as_changed): Adjusted to the fact that the texts member of Conference is now a l2g. (setup_small_conf): Likewise. * src/server/ram-parse.h (fparse_text_list): Removed. * src/server/ram-parse.c (fparse_conference_2): Use l2g_read instead of fparse_text_list. (fparse_person_2): Likewise. (fparse_text_list): The result argument now points to a Local_to_global instead of a Text_list. * src/server/ram-output.h (foutput_text_list): The text_list argument is now a pointer to Local_to_global instead of a Text_list. * src/server/ram-output.c (foutput_person_0): Adjusted to new API of foutput_text_list. (foutput_person_2): Use l2g_write instead of foutput_text_list. (foutput_conference_2): Likewise. (foutput_conference_1): Adjusted to new API of foutput_text_list. (foutput_conference_0): Likewise. (foutput_text_list): The text_list argument is now a pointer to Local_to_global instead of a Text_list. The generated output is still the same. (foutput_ulong): Eliminated a future buffer overrun. Cleaned up the code. * src/server/prot-a.c (prot_a_reply): Handle rt_l2g_iterator_as_text_list. * src/server/prot-a-output.h (prot_a_output_l2g_iterator_as_text_list): New function. * src/server/prot-a-output.c (prot_a_output_person): Adjusted to the fact that the created_texts member of Person is now a l2g. (prot_a_output_conference): Adjusted to the fact that the texts member of Conference is now a l2g. (prot_a_output_conference_old): Likewise. (prot_a_output_l2g_iterator_as_text_list): New function which emulates a Text_list. * src/server/person.c (do_delete_pers): Adjusted to the fact that the created_texts member of Person is now a l2g. (get_created_texts): The return value is now an l2g_iterator_as_text_list, not a Text_list. Adjusted to the fact that the created_texts member of Person is now a l2g. * src/server/memory.c (clear_text_list): Removed. (copy_text_list): Removed. (clear_conference): Adjusted to the fact that the texts member of Conference is now a l2g. (init_conference): Likewise. (copy_conference): Likewise. Added const qualifier to the argument. (clear_person): Adjusted to the fact that the created_texts member of Person is now a l2g. (copy_person): Likewise. (init_person): Likewise. (init_text_list): Removed. (copy_aux_item_list): Added const qualifier to the src argument. * src/server/membership.c (add_rec_time): Adjusted to the fact that the texts member of Conference is now a l2g. (adjust_read): Likewise. (mark_as_read): Likewise. (check_membership): Likewise. (set_unread): Likewise. (set_last_read): Likewise. * src/server/kom-memory.h (copy_conference): The argument is const. (copy_aux_item_list): Likewise. (init_text_list): Removed. * src/server/fncdef.txt (get_map): Changed return type from text_list to l2g_iterator_as_text_list. (get_created_texts): Likewise. * src/server/dbck.c (struct delete_list): New struct. (delete_list_append): New static function. (execute_deletions): New static function. (check_misc_infos): Adjusted to the fact that the texts member of Conference is now a l2g. (adjust_text_list): Deleted. (check_created_texts): The "created" argument now points to a Local_to_global. Removed the check for "bad created_texts array" since it can no longer be bad in that way. (check_membership): Adjusted to the fact that the texts member of Conference is now a l2g. (check_texts_in_conf): The "tlist" argument now points to a Local_to_global. Removed the check for "bad created_texts array" since it can no longer be bad in that way. * src/server/dbck-cache.c (cached_get_highest_local_no): Adjusted to the fact that the texts member is now a l2g. (cache_sync): Fixed type in some printf format strings. * src/server/connections.h (Res_type): Added rt_l2g_iterator_as_text_list. (Result_holder): Added l2g_iterator_as_text_list. * src/server/conference.c: (do_delete_conf): Adjusted to the fact that the texts member is now a l2g. * src/server/Makefile.am (DBCK): Added local-to-global.c. (all-recursive, check-recursive): Require libcheck.a to be built. * src/include/services.h (get_created_texts): Changed type of the result to L2g_iterator_as_text_list. (get_map): Likewise. * src/include/kom-types.h (struct l2g_block_info): New forward declaration. (Local_to_global): New type. (L2g_iterator): New type. (L2g_iterator_as_text_list): New type. (Conference): The texts member is now a Local_to_global, not a Text_list. (Person): The created_texts member is now a Local_to_global, not a Text_list. Fixes and improvements to the Local_to_global structure. * src/server/local-to-global.h (L2G_BLOCKSIZE): Moved to local-to-global.c. (L2g_block_info): Likewise. (Local_to_global): Likewise. (l2g_copy): Switched placement of src and dest to match other copy functions in the lyskomd code. Added const qualifier. (l2g_lookup): Added const qualifier to the l2g argument. (l2g_next_key): Likewise. (l2g_compact): Removed. (l2g_first_appendable_key): New function. (l2g_delete_global_in_sorted): New function. (l2g_dump): Switch placement of l2g and file arguments to match other similar functions in the lyskomd code. Added const qualifier. (l2g_write): Likewise. (l2g_read): Likewise. (l2g_searchall): Added const qualifier. (L2g_iterator): Moved to kom-types.h. (l2gi_searchsome): Added const qualifier. (l2gi_begin): New function. (l2gi_end): New function. * src/server/local-to-global.c: Include assert.h. Only include stdlib.h if HAVE_STDLIB_H. Include stdio.h if we didn't get NULL from stdlib.h. Inlucd lyskomd.h and server/smalloc.h. (L2G_BLOCKSIZE): Moved here from local-to-global.h. (struct l2g_block_info): Likewise. (is_dense): New static function. (is_empty): New static function. (key_value): New static function. (sparse_skip_deleted): New static function. (sparse_locate_value): New static function. (sparse_compact): New static function. (add_block): Use srealloc instead of realloc. Don't initialize start -- the caller is responsible for doing so. (delete_block): Use sfree instead of free, and srealloc instead of realloc. (make_sparse): Don't change the value of start, since there is no need to, and make_sparse may now be called on an empty block, which would cause start to be set to a garbage value. (find_block): Added a const qualifier to the return value and l2g argument. Use key_value to simplify code. (find_block_index_key): Added a const qualifier to the l2g argument. Use helper functions to simplify the code. Use sparse_skip_deleted so that the function never returns a deleted key. Never return deleted keys in dense blocks either. (join_range): New static function. (join_blocks): New static function. (l2g_init): Set first_unused to 1. (l2g_clear): Use sfree instead of free. Set first_unused to 1. (l2g_copy): Added const qualifier to the src argument. Simplified code by using helper functions and relying on the fact that calling l2g_append with a Text_no=0 is a no-op. Set first_unused of the copy. (l2g_append): Send a log message and do nothing if an attempt to set a local number lower than first_unused is detected. Set first_unused. Fixed the logic about when to add a new block, when to compact the last block, and when to make it sparse. Simplify code by using the helper functions. (l2g_delete): Don't increase the zeroes counter if a zero is deleted. Delete the entire block if it became empty. Attempt to join this block to its neighbors. Compact the block if it was sparse and contained too many deleted entries. (l2g_lookup): Added const qualifier to the l2g argument. Don't return uninitialized data. Use helper functions to simplify code and make it slightly faster. (l2g_next_key): Added const qualifier to the l2g argument. (l2g_first_appendable_key): New function. (l2g_delete_global_in_sorted): New function. (l2g_compact): Removed. (l2g_dump): Switch placement of l2g and file arguments to match other similar functions in the lyskomd code. Added const qualifier. Dump first_unused. Use helper functions to simplify code. (l2g_read): Switch placement of l2g and file arguments to match other similar functions in the lyskomd code. Read first_unused. Return a success indicator. Detect unexpected EOF conditions. (l2g_write): Switch placement of l2g and file arguments to match other similar functions in the lyskomd code. Write first_unused. Use helper functions to simplify code. (l2gi_searchall): Added const qualifier to the l2g argument. Simplify code by calling l2gi_searchsome instead of duplicating the code. (l2gi_searchsome): Added const qualifier to the l2g argument. Complain if the begin argument is less than 1. Don't forget to initialize search_ended. Set beginval. Giving end==0 means that the iterator should continue to the end of the set. Use helper functions to simplify the code. (l2gi_next): Use helper functions to simplify code. The iterator is unlimited if endval==0. (l2gi_begin): New function. (l2gi_end): New function. Improve the test suite with new tests of the Local_to_global structure. * src/server/testsuite/l2g.0/00.exp: The "C" command now takes the arguments the other way around. Adjust the test case. Comments added. Expect the "u" command to print first_unused. * src/server/testsuite/l2g.0/02.exp: New file. * src/server/testsuite/l2g.0/03.exp: New file. * src/server/testsuite/l2g.0/04.exp: New file. * src/server/testsuite/l2g.0/05.exp: New file. * src/server/testsuite/l2g.0/06.exp: New file. * src/server/testsuite/l2g.0/07.exp: New file. * src/server/testsuite/l2g.0/08.exp: New file. * src/server/testsuite/l2g.0/09.exp: New file. * src/server/testsuite/config/unix.exp (l2g_stop): Added a wait statement to avoid creating zombies. (simple_expect): Added a missing space in a prompt regexp. * src/server/testsuite/test-l2g.c (main): Removed the 'c' command since l2g_compact no longer exists. Added the 'i' command that tests iterators. Adjusted to the new API of l2g_dump, l2g_read and l2g_write. Require an extra trailing newline after the representation l2g_read expects when the 'r' command is used, and produce a corresponding newline with the 'w' command. Renamed the 'p' command to 'w'. 1998-07-19 Per Cederqvist Protocol buglets fixed. * doc/Protocol-A.texi (Membership-Type, Session-Flags): Fixed syntax error in the definition. 1998-07-12 Per Cederqvist Build the program in the test suite. * src/server/ramkomd.c (restart_kom): Moved to log.c. * src/server/log.c (restart_kom): Moved here from ramkomd.c. * src/server/Makefile.am (noinst_LIBRARIES): Added libcheck.a. (libcheck_a_SOURCES): New library, used by the test suite. * src/server/testsuite/Makefile.am (noinst_PROGRAMS): Added test-l2g. (EXTRA_DIST): Removed test-l2g.c. (test_l2g_SOURCES): Added test-l2g.c. (test_l2g_LDADD): Added ../libcheck.a. (../libcheck.a): New target. Removed all old makefile template files. * Makefile.src: Removed. * doc/Makefile.src: Removed. * doc/man/Makefile.src: Removed. * run-support/Makefile.src: Removed. * scripts/Makefile.src: Removed. * src/Makefile.src: Removed. * src/include/Makefile.src: Removed. * src/include/server/Makefile.src: Removed. * src/libraries/Makefile.src: Removed. * src/libraries/gnumalloc/Makefile.src: Removed. * src/libraries/libansi/Makefile.src: Removed. * src/libraries/libcommon/Makefile.src: Removed. * src/libraries/libisc-new/Makefile.src: Removed. * src/libraries/libisc-new/src/Makefile.src: Removed. * src/libraries/libmisc/Makefile.src: Removed. * src/libraries/regex/Makefile.src: Removed. * src/libraries/regex/doc/Makefile.src: Removed. * src/libraries/regex/test/Makefile.src: Removed. * src/server/Makefile.src: Removed. * src/server/testsuite/Makefile.src: Removed. Fixed "make dist". * SERVER-RELEASE: Slightly updated. * src/server/testsuite/config/Makefile.am: New file. * src/server/testsuite/Makefile.am (SUBDIRS): Added config. (EXTRA_DIST): Added .cvsignore and test-l2g.c. (MOSTLYCLEANFILES): Added .gdbinit and site.exp. * src/server/Makefile.am (EXTRA_DIST): Added .cvsignore, ChangeLog.1, Magics, To-do, aux-item-def.l, aux-item-def.y, call-switch.awk, com-h.awk, fnc-def-init.awk, prot-a-parse-arg-c.awk, prot-a-parse-arg-h.awk, fncdef.txt, free.gdb, handle-malloc-dump.el, malloc.gdb, realloc.gdb, trace-mem.gdb and logII.c. (MOSTLYCLEANFILES): Added .gdbinit, call-switch.incl, com.h, fnc-def-init.incl, fncdef-no-str-limit.txt, prot-a-parse-arg.h and version.incl. (MAINTAINERCLEANFILES): Added aux-item-def.tab.h. (lyskomd_SOURCES): Added admin.h, async.h, aux-items.h, cache-node.h, cache.h, conf-file.h, connections.h, end-of-atomic.h, exp.h, internal-connections.h, internal-services.h, isc-interface.h, isc-malloc.h, isc-parse.h, kom-memory.h, local-to-global.h, log.h, lyskomd.h, manipulate.h, minmax.h, mux-parse.h, mux.h, param.h, prot-a-output.h, prot-a-parse.h, prot-a-send-async.h, prot-a.h, ram-output.h, ram-parse.h, rfc931.h, send-async.h, server-config.h, string-malloc.h, text-garb.h, tmp-limits.h and version-info.h. (dbck_SOURCES): Added dbck-cache.h and getopt.h. * src/libraries/libmisc/Makefile.am (EXTRA_DIST): Added ChangeLog.1. * src/libraries/libcommon/Makefile.am (EXTRA_DIST): Added ChangeLog.1. * src/include/Makefile.am (EXTRA_DIST): Added ChangeLog.1. * run-support/Makefile.am (EXTRA_DIST): Added .cvsignore, komrunning.sh and savecore.sh. * doc/man/Makefile.am (EXTRA_DIST): Added $(man_MANS). * doc/prot-A-english.txt: Added a reference to Protocol-A.texi. * doc/Makefile.am (EXTRA_DIST): Added Buggar.fixade, Bugrapporter, LOGG, Protocol-A.texi, aux-info.doc, clients.assigned, cmsltt12.mf, dbck.latexinfo, disc-cache.spec, local-to-global.doc, lyskomd-database-format, mux.proto, prot-A-english.txt and security-levels.txt. * db-crypt/db/Makefile.am (EXTRA_DIST): Added .cvsignore. * db-crypt/Makefile.am (EXTRA_DIST): Added .cvsignore. * configure.in: Generate src/server/testsuite/config/Makefile. * Makefile.am (EXTRA_DIST): Added ChangeLog.1, README.FSF, SERVER-RELEASE, mkmi and versions. Removed obsolete and unused files. * src/server/disk-end-of-atomic.c: Don't include disk-cache.h. * src/server/sync.c: Removed. * src/server/disk-cache.h: Removed. * src/server/cache.c: Removed. * src/server/cache-database.h: Removed. * src/server/cache-database.c: Removed. * scripts/mkmi.m4: Removed. * scripts/makedist.sh: Removed. * doc/libraries: Removed * doc/fileformat: Removed. * doc/elisp-client.user-manual: Removed. * doc/elisp-client.internals: Removed. * doc/Introduktion: Removed. Don't version-control generated files. * src/server/aux-item-def.tab.h: No longer kept under version control. Removed the last traces of zmalloc. * src/libraries/libmisc/Makefile.am (libmisc_a_SOURCES): Removed zmalloc.h. 1998-07-11 Per Cederqvist Install the sample database (unless it was already installed). * configure.in: Generate db-crypt/db/Makefile. * db-crypt/Makefile.am (SUBDIRS): Added db. * db-crypt/db/Makefile.am: New file. Fix compilation outside the source directory. * src/server/Makefile.am (aux-item-def.tab.c): Look for aux-item-def.y in srcdir. 1998-07-10 Per Cederqvist Fix "make install". * run-support/Makefile.am (sysconf_DATA): Added, but empty. (EXTRA_DIST): Added config and aux-items.conf. (komrunning): The current standard names the variable sysconfdir, not etcdir. (savecore): Likewise. (install-data-local): Likewise. Fix the configure script so that --enable-isc-printf is no longer needed. * configure.in: Force enable_isc_printf so that libisc contains the proper things. Some versions of libnsl and/or libsocket are reportedly bogus, so don't link against them unless it is really necessary. * configure.in: Improved checking for -lsocket and -lnsl. 1998-07-09 Per Cederqvist Don't forget src/server/testsuite. * configure.in: Don't forget src/server/testsuite. (USING_GNU_MALLOC): An automake conditional. * src/server/testsuite/test-l2g.c (main): Make it a proper prototype. Avoid problems with signed chars. Fixed typo: use l2g_write, not l2g_print. * src/server/testsuite/Makefile.am: New file. * src/server/Makefile.am (SUBDIRS): New variable; added testsuite. Don't try to compile zmalloc which was removed yesterday. * src/libraries/libmisc/Makefile.am (libmisc_a_SOURCES): Removed zmalloc.c. Build komrunning and savecore. * run-support/Makefile.am: New file. Switch to using automake. * mkmi: Run aclocal, automake and autoconf instead of creating Makefile.in via a m4 script. * configure.in: Move up AC_CONFIG_AUX_DIR so that both automake and autoconf detects it early enough. Remove explicit AC_SUBST of several variables that automake handles automatically, or that was used for functionality that automake provides in different ways: CFLAGS, CPPFLAGS, LDFLAGS, DEPENDFLAGS, INCLUDE_CURRENT, EXTRAARFLAGS, SRCTOPDIR, BUILDTOPDIR. Added call to AM_C_PROTOTYPES. Rely on automakes ability to fix dependencies automatically and handle ARFLAGS properly. Use CMOD_COMPILER_CC_ACCEPTS to check for a lot of warning flags to use. Use CMOD_C_ATTRIBUTE_UNUSED. Use AM_PROG_LEX instead of AC_PROG_LEX. Removed check for sys/select.h, which only isc uses. Added check for values.h. Run configure in src/libraries/libisc-new instead of creating makefiles in that directory. Generate db-crypt/Makefile and run-support/Makefile. Don't version-control files that are generated by aclocal, automake, autoconf or bison. * Makefile.in: No longer kept under version control. * aclocal.m4: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise. * doc/man/Makefile.in: Likewise. * run-support/Makefile.in: Likewise. * scripts/Makefile.in: Likewise. * scripts/install-sh: Likewise. * scripts/mkinstalldirs: Likewise. * src/Makefile.in: Likewise. * src/include/Makefile.in: Likewise. * src/include/server/Makefile.in: Likewise. * src/libraries/Makefile.in: Likewise. * src/libraries/libansi/Makefile.in: Likewise. * src/libraries/libcommon/Makefile.in: Likewise. * src/libraries/libmisc/Makefile.in: Likewise. * src/server/Makefile.in: Likewise. * src/server/aux-item-def.tab.c: Likewise. 1998-07-08 Per Cederqvist Use libisc-0.99. * src/server/isc-interface.h: Include "isc.h" instead of "isc-new.h". (ISC_PRINTF_SUPPORT): Define it. * src/libraries/libisc-new: Replace the old contents with that of isc-0.99. Se src/libraries/libisc-new/ChangeLog for information about any modifications that are made to the library. Added files that automake requires. * AUTHORS: New file. * README-serverrelease: Renamed to README. * README: New name for former README-serverrelease. * acinclude.m4: New file. Contents taken from the old aclocal.m4, but changed to match the contents of libisc. Added new makefile templates for automake. * Makefile.am: New file. * db-crypt/Makefile.am: New file. * doc/Makefile.am: New file. * doc/man/Makefile.am: New file. * scripts/Makefile.am: New file. * src/Makefile.am: New file. * src/include/Makefile.am: New file. * src/include/server/Makefile.am: New file. * src/libraries/Makefile.am: New file. * src/libraries/libansi/Makefile.am: New file. * src/libraries/libcommon/Makefile.am: New file. * src/libraries/libmisc/Makefile.am: New file. * src/server/Makefile.am: New file. Code cleanup for increased portability. * src/libraries/libmisc/pom.c: Use HAVE_VALUES_H instead of __svr4__ and __sparc__ to protect inclusion of . (rcsid): Added a missing const. Improved some variable types and fixed problems with signed chars. * src/server/simple-cache.c (rcsid): Added a missing const. (next_free_num): Changed type from int to Conf_no. (next_text_num): Changed type from int to Text_no. (read_person): Flag unused parameters. (read_conference): Likewise. (read_text_stat): Likewise. (cached_get_text_stat): Adjusted printf format according to the next_text_num change. (init_cache): Likewise. (free_match_table): Renamed a parameter name to avoid warnings from gcc. (build_matching_info): Renamed a local variable name to avoid warnings from gcc. (pre_sync): Use tno_iter and cno_iter instead of i to get all types correct. (post_sync): Likewise. (copy_file): Flag unused parameters. * src/server/ram-parse.c (rcsid): Added a missing const. (fparse_info_0): Now static. (fparse_info_2): Likewise. (fparse_conference_2): Likewise. (fparse_conference_0): Likewise. (fparse_person_0): Likewise. (fparse_person_2): Likewise. (fparse_text_stat_2): Likewise. (fparse_text_stat_0): Likewise. (fparse_conf_list): Changed type of local variable "i" from int to unsigned long. (fparse_text_list): Likewise. * src/server/ram-output.c (foutput_text_list): Changed type of local variable "i" from int to unsigned long. (foutput_time): Renamed a parameter name to avoid warnings from gcc. (rcsid): Added a missing const. * src/server/prot-a-output.c (prot_a_output_conf_list): Changed type of local variable "i" from int to unsigned long. (prot_a_output_text_list): Likewise. (prot_a_output_time): Renamed local variable names to avoid warnings from gcc. (rcsid): Added a missing const. * src/server/local-to-global.c (Local_text_no_iter): New experimental typedef. (l2g_append): Renamed i to ix and changed type to Local_text_no_iter. * src/server/dbck-cache.c: Include dbck-cache.h. (rcsid): Added a missing const. (next_text_num): Changed type from int to Text_no. (TEXT_RANGE): Adjusted printf format for next_text_num change. (VOID_TEXT_RANGE): Likewise. (cache_sync): Changed type of local variable i from int to unsigned long. Removed extern declaration of oformat. Adjusted printf formats for next_text_num change. (init_cache): Removed extern declaration of oformat. Adjusted printf formats for next_text_num change. * src/server/conference.c (do_create_conf): Now static. (do_lookup): Changed type of local variables i and retsize to avoid warnings. Handle overflow a little better and log warning messages if overflow ever occurs. (rcsid): Added a missing const. * src/libraries/libmisc/s-string.c (s_strcmp): Changed type of loop variable from "unsigned int" to "String_size". (s_usr_strcmp): Likewise. (char2digit): Added const qualifier to translate_table. Use an int as argument to isalpha and tolower to avoid problems with signed chars. (rcsid): Added a missing const. * src/server/conf-file.c (assign_text_no): Don't use isdigit unless isascii is true. Use an int as argument to isalpha and isdigit to avoid problems with signed chars. (assign_conf_no): Likewise. (assign_int): Likewise. (rcsid): Added a missing const. Many minor tweaks to remove annoying but harmless warnings from gcc. * src/server/updateLysKOM.c (checkstatus): Now static. * src/server/text.c: Include internal-services.h. (rcsid): Added a missing const. (set_loc_no): Renamed a parameter name to avoid warnings from gcc. (find_recipient): Now static. Removed declaration of errno. * src/server/session.c (get_time): Renamed a parameter name to avoid warnings from gcc. (rcsid): Added a missing const. * src/server/server-config.c (log_param): Flag unused argument. (param_name): Now static. (rcsid): Added a missing const. * src/server/rfc931.c: Include rfc931.h. (get_real_username): Added a const qualifier to the return value. * src/server/rfc931.h (get_real_username): Added a const qualifier to the return value. * src/server/ramkomd.c (rcsid): Added a missing const. (init_data_base): Removed unused argument dir_base. All callers updated. (sighandler_hup): Flag unused argument. (sighandler_quit): Likewise. (sighandler_usr1): Likewise. (sighandler_usr2): Likewise. (go_daemon): Make it a function prototype. (initialize): New static. * src/server/mux.c: (rcsid): Added a missing const. (UCB_printf): Specify the return type in the extern declaration. * src/server/membership.c (do_add_member): Renamed local variable names to avoid warnings from gcc. (do_sub_member): Likewise. (locate_member): Likewise. (check_membership): Likewise. (set_membership_type): Likewise. (rcsid): Added a missing const. * src/server/log.c (rcsid): Added a missing const. (logv): Renamed local variable names to avoid warnings from gcc. (log): Likewise. * src/server/internal-services.h (do_create_conf): Declaration removed. This function is static. * src/server/dbck.c (register_jubel): Flag unused arguments. (locate_member): Renamed local variable names to avoid warnings from gcc. (check_misc_infos): Likewise. (check_created_texts): Likewise. (check_membership): Likewise. (check_texts_in_conf): Likewise. (confirm): Added const qualifier to argument question. (check_member): Likewise. (init_data_base): Removed the unused dbase_dir argument. All callers updated. * src/server/dbck-cache.h (oformat): Declaration added. * src/server/connections.c (login_request): Added a missing const to the realuser local variable. (rcsid): Added a missing const. * src/server/conf-file.h (struct parameter): Added const qualifier to the name and default_val tags. * src/server/aux-items.c: Include services.h. (aux_item_definition_cache_regexp): Now static. (initialize_aux_items): Removed declaration of parse_aux_item_definitions. (aux_item_call_add_triggers): Now static. (aux_item_call_delete_triggers): Now static. (aux_item_call_undelete_triggers): Now static. * src/server/aux-items.h (Aux_item_definition_s): Added const qualifier to the name tag. (Aux_item_trigger_mapping): Likewise. (parse_aux_item_definitions): Declaration added. * src/server/aux-item-def.y: (aux_item_def_typename): Added const qualifier to the return value. (aux_item_def_check_assign): Added const qualifier to the id argument. (aux_item_def_check_trigger): Added const qualifier to the check_name argument. * src/server/admin.c (shutdown_kom): Flag unused arguments. (rcsid): Added a missing const. * src/include/services.h: Renamed a few parameter names to avoid warnings from gcc. * src/server/prot-a-output.h: Likewise. * src/server/ram-output.h: Likewise. * src/libraries/libcommon/parser.h: Likewise. * src/server/manipulate.h: Likewise. * src/libraries/libcommon/kom-errno.c (rcsid): Added a missing const. * src/libraries/libcommon/misc-parser.c: Likewise. * src/libraries/libcommon/parser.c: Likewise. * src/libraries/libmisc/s-collat-tabs.c: Likewise. * src/server/cache-node.c: Likewise. * src/server/disk-end-of-atomic.c: Likewise. * src/server/internal-connections.c: Likewise. * src/server/isc-malloc.c: Likewise. * src/server/isc-parse.c: Likewise. * src/server/memory.c: Likewise. * src/server/mux-parse.c: Likewise. * src/server/person.c: Likewise. * src/server/prot-a-parse.c: Likewise. * src/server/prot-a-send-async.c: Likewise. * src/server/prot-a.c: Likewise. * src/server/ram-smalloc.c: Likewise. * src/server/regex-match.c: Likewise. * src/server/send-async.c: Likewise. * src/server/string-malloc.c: Likewise. * src/server/text-garb.c: Likewise. * src/libraries/libansi/empty.c: Likewise. Remove some old unused files. * src/libraries/libmisc/zmalloc.c: Unused file removed. * src/libraries/libmisc/zmalloc.h: Unused file removed. * src/server/kom-types.c: Empty file removed. * scripts/Summarize-Headers: File removed. * scripts/List-Files: File removed. * src/libraries/libclient/.cvsignore: File removed. * src/libraries/libclient/Makefile.in: File removed. * src/libraries/libclient/async.c: File removed. * src/libraries/libclient/async.h: File removed. * src/libraries/libclient/client-Makefile.in: File removed. * src/libraries/libclient/client-malloc.h: File removed. * src/libraries/libclient/client.c: File removed. * src/libraries/libclient/client.h: File removed. * src/libraries/libclient/input.c: File removed. * src/libraries/libclient/input.h: File removed. * src/libraries/libclient/kom-types.c: File removed. * src/libraries/libclient/output.c: File removed. * src/libraries/libclient/output.h: File removed. * src/libraries/libclient/parse.c: File removed. * src/libraries/libclient/parse.h: File removed. * src/libraries/libclient/send.c: File removed. * src/libraries/libclient/send.h: File removed. * src/libraries/libclient/services.c: File removed. * src/libraries/libclient/services.h: File removed. 1998-07-07 Per Cederqvist Fixed spelling of the config file parameter "Max broadcast length". * src/server/server-config.c (parameters): Fixed mis-spelling of "Max broadcast length". * doc/man/lyskomd.8: Likewise. * doc/Protocol-A.texi: Minor errata. * doc/security-levels.txt: Converted from swascii to latin1. 1998-06-14 David Byers * src/server/membership.c (copy_public_confs): The supervisor of a conference can now see secret parts of member's memberships. (get_members): Ditto. (set_membership_type): Don't allow secret memberships if the conference forbids it. (add_member): Ditto. (add_member): Pretend that addition worked if the person is already a secret member. (do_get_membership): Renamed from get_membership_old. (get_membership_old): New function. (get_membership): Call do_get_membership (do_get_members): Renamed from get_members. (copy_public_confs): New argument want_passive. * src/server/prot-a-output.c (prot_a_output_extended_conf_type): Added output of forbid_secret. * src/server/prot-a-parse.c (prot_a_parse_conf_type): Added parse of forbid_secret. * src/server/ram-parse.c (fparse_conf_type): Added parse of forbid_secret. * src/server/ram-output.c (foutput_conf_type_1): Added output of forbid_secret. * src/include/kom-types.h: Added forbid_secret conf_type. 1998-06-10 David Byers * src/server/membership.c (sub_member): Return KOM_NOT_MEMBER for secret memberships. 1998-06-08 David Byers * 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 * 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 * src/server/cache-node.h: New flags: snapshot and synced. Sun Sep 21 21:16:28 1997 David Byers * src/server/memory.c (copy_text_stat): Call copy_aux_item_list. (copy_aux_item_list): New function. (copy_aux_item): New function. (copy_conference): Call copy_aux_item_list. (clear_conference): Free the aux_item_list (init_conference): Init the aux_item_list. (clear_text_stat): Free the aux_item_list. (init_text_stat): Init the aux_item_list. (init_aux_item_list): New function. Sat Sep 13 15:07:32 1997 David Byers * run-support/aux-items.conf: New file. This is the aux-item definition file. * src/server/aux-items.h: New file. Include this when using aux-items. * src/server/aux-items.c: New file. Implements most of the functionality associated with aux-items. * src/server/aux-item-def.l: New file. Implements the scanner for the aux-item definition file parser. * src/server/aux-item-def.y: New file. Implements the aux-item definition file parser. * src/server/text.c: Added support for aux-items. Set err_stat whenever kom_errno is set. (create_text_old): Renamed from create_text. Use do_create_text. (create_text): New RPC function. (create_anonymous_text): New RPC function. (create_anonymous_text_old): Renamed from create_anonymous_text. Use do_create_text. (do_create_text): New function similar to old create_text, but with aux-item support. (count_recipients): Handle bcc-recpt. (find_recipient): Handle bcc-recpt. (do_add_bcc_recpt): New function to add bcc-recipient. (do_delete_misc): Handle bcc_recpt. (do_sub_recpt): Handle bcc_recpt. (sender): Handle bcc_recpt. (is_sender): Handle bcc_recpt. (is_comm_sender): Handle bcc_recpt. (skip_recp): Handle bcc_recpt. (is_member_in_recpt): Handle bcc_recpt. (filter_secret_info): Handle bcc_recpt. (text_read_access): Handle bcc_recpt. (do_delete_text): Handle bcc_recpt. (check_double_subm): Handle bcc_recpt. (check_double_comm): Handle bcc_recpt. (create_text_check_misc): Handle bcc_recpt. (create_text_add_miscs): Handle bcc_recpt. (add_recipient): Handle bcc_recpt. (filter_secret_info): Filter aux-items as well as misc-info. (create_text_add_aux): New function. (send_async_new_text_old): Renamed from send_async_new_text. (send_async_new_text): New function. (get_text_stat_old): Renamed from get_text_stat. (get_text_stat): New RPC function. (modify_text_info): New RPC function. (do_delete_text): Send async deleted text. * src/server/text-garb.c (garb_text): Handle bcc-recpt. * src/server/simple-cache.c: Set err_stat whenever kom_errno is set. (cached_lookup_name): Set kom_errno to KOM_INTERNAL_ERROR is parse() fails. (pre_sync): Write version 2 data file. (cached_delete_conf): Delete conference name from small_conf_arr. (pre_sync): Use foutput_info instead of writing it here. (init_cache): Return KOM_INTERNAL_ERROR on problems with the files. Prettier handling of datafile versions (switch instead of testing for one single version.) Call set_input_format to set the input format. Use fparse_info to read info instead of parsing it here. If we encounter an unknown key, print its offset. * src/server/session.c: Set err_stat whenever kom_errno is set. (accept_async): Return KOM_UNKNOWN_ASYNC if an unknown async message is requested. (login_old): Test wheel bit (test removed from is_supervisor.) (login): Test wheel bit (test removed from is_supervisor.) (disconnect): Test wheel bit (test removed from is_supervisor.) * src/server/server-config.c (parameters): Add max_add_aux and max_delete_aux. (toplevel): Set AUX_DEF_FILE constant. * src/server/send-async.h: Declare new functions in send-async.c * src/server/send-async.c (async_new_text_old): Renamed from async_new_text. (async_new_text): New function to send new new-text async. (async_send_group_message): Return KOM_MESSAGE_NOT_SENT on failure because of no accepting recipient. Return KOM_FEATURE_DISABLED if messages are disabled. Return INTERNAL_ERROR on an internal error. (async_deleted_text): New function to send new deleted-text async. * src/server/regex-match.c (lookup_regexp): Set err_stat when kom_errno is set. * src/server/ramkomd.c: (initialize): Initialize aux-item definitions. (main): Handle -a and -c options, and user-selectable aux-item definition file. * src/server/ram-parse.h: Declare new function in ram-parse.c * src/server/ram-parse.c: Better support for reading different input formats by using solution similar to that in ram-output.c. New variable input_format controls input format. (set_input_format): New function selects input format. (fparse_info_0): New function. (fparse_info_2): New function. (fparse_info): New function. (fparse_conference_2): New function. (fparse_conference_0): New function. (fparse_conference): New function. (fparse_person_0): New function. (fparse_person_2): New function. (fparse_person): New function. (fparse_text_stat_2): New function. (fparse_text_stat_0): New function. (fparse_text_stat): New function. (fparse_aux_item_flags): New function to read aux-item flags. (fparse_aux_item): New function to read an aux-item. (fparse_aux_item_list): New function to read an aux-item-list. (fparse_misc_info): Parse bcc-recpt. * src/server/ram-output.h: Declare new functions in ram-output.c * src/server/ram-output.c: Better support for writing different output formats by using foutput_something_ and a switch in foutput_something. New variable output_format selects output format. (set_output_format): New function to select output format. (foutput_info_0): New function. (foutput_info_2): New function. (foutput_info): New function. (foutput_person_0): New function. (foutput_person_2): New function. (foutput_person): New function. (foutput_conference_2): New function. (foutput_conference): New function. (foutput_text_stat_0): New function. (foutput_text_stat_2): New function. (foutput_text_stat): New function. (foutput_aux_flags): New function to output aux-item flags. (foutput_aux_item): New function to output aux-items. (foutput_aux_item_list): New function to output aux-item-lists. (foutput_misc_info): Output bcc-recpt. * src/server/prot-a.c (prot_a_reply): Added support for new and renamed return types: rt_conference, rt_conference_old, rt_text_stat, rt_text_stat_old, rt_info, rt_info_old. (prot_a_init): Initialize aux_item_list of Connection. (prot_a_destruct): Clear the aux_item_list in Connection. (prot_a_is_legal_fnc): Add support for new and changed RPC calls (see entry for fncdef.txt.) * src/server/prot-a-send-async.h: Declare new functions in prot-a-send-async.c * src/server/prot-a-send-async.c (prot_a_async_new_text_old): Renamed from prot_a_async_new_text. (prot_a_async_new_text): New async message function. (prot_a_async_deleted_text): New async message function. * src/server/prot-a-parse.h: Declare new functions in prot-a-parse.c * src/server/prot-a-parse.c (prot_a_parse_aux_item_flags): New function. (prot_a_parse_aux_item): New function. (prot_a_parse_aux_item_list): New function. (prot_a_parse_misc_info): Parse bcc_recpt info type. * src/server/prot-a-output.h: Declare new functions in prot-a-output.c * src/server/prot-a-output.c (prot_a_output_conference): New output function. (prot_a_output_conference_old): Renamed from old prot_a_output_conference. (prot_a_output_aux_item_flags): New function. (prot_a_output_aux_item): New function. (prot_a_output_text_stat_old): Renamed from prot_a_output_text_stat. (prot_a_output_aux_item_list): New function. (prot_a_output_text_stat): New function. (prot_a_output_info): New function. (prot_a_output_info_old): Renamed from prot_a_output_info. (prot_a_output_misc_info): Output bcc_recpt misc type. * src/server/person.c: Added support for aux-items. Set err_stat whenever kom_errno is set. (create_person_generic): Moved all generic create_person code to this function. (create_person_old): Renamed from create_person, use create_person_generic. (create_person): New RPC function. (set_passwd): Test wheel bit when doing is_supervisor (test removed from is_supervisor.) * src/server/param.h: Added max_delete_aux, max_add_aux to struct kom_par. * src/server/memory.c (free_aux_item_list): New function to free all data in an Aux_item_list. * src/server/membership.c: Set err_stat whenever kom_errno is set. (access_perm): Test wheel bit (test removed from is_supervisor.) (add_member): Test wheel bit (test removed from is_supervisor.) * src/server/manipulate.h: Set err_stat whenever kom_errno is set. Declare is_strictly_supervisor. * src/server/kom-memory.h: Declare free_aux_item_list. * src/server/internal-connections.c (init_connection): Clear aux_item and aux_item_list fields of Connection. Clear aux_item_list field of Info. * src/server/fncdef.txt: Added comments to separate protocol versions. New calls: get_collate_table, create_text, create_anonymous_text, create_conf, create_person, get_text_stat, get_conf_stat, modify_text_info, modify_conf_info, get_info, modify_server_info, query_predefined_aux_items, set_expire. Renamed calls: get_text_stat to get_text_stat_old, get_conf_stat_old to get_conf_stat_older, get_conf_stat to get_conf_stat_old, get_info to get_info_old, create_conf to create_conf_old, create_pers to create_pers_old, create_text to create_text_old, create_anonymous_text to create_anonymous_text_old. * src/server/dbck.c (check_misc_infos): Handle m_bcc_recpt. (is_recipient): Handle bcc_recpt. (main): Use set_output_format to select the output format. * src/server/dbck-cache.c: Set err_stat whenever kom_errno is set. (cache_sync): Use foutput_info instead of outputting the info here. (cache_sync): Call foutput_conference, not foutput_conference_old. ram-output now takes care of selecting the correct version to write. (init_cache): Use fparse_info instead of reading the info here. * src/server/connections.h: (Connection): Add aux_item_list and aux_item. (Res_type): Renamed return types: rt_conference to rt_conference_old. rt_text_stat to rt_text_stat_old, rt_info to rt_info_old. Addet rt_conference, rt_text_stat and rt_info. (Result_holder): Added conference_old, text_stat_old and info_old. * src/server/connections.c: Include kom-memory.h. Set err_stat whenever kom_errno is set. (free_parsed): Free data in aux_item and aux_item_list. * src/server/conference.c: Added support for aux-items. Set err_stat whenever kom_errno is set. (is_strictly_supervisor): New function. (is_supervisor): Use is_strictly_supervisor. Don't test the wheel bit of ACTPERS. (create_conf_generic): Moved generic create_conf code here. (create_conf_old): Renamed from create_conf. Use create_conf_generic. (create_conf): New RPC function. (get_conf_stat): New RPC function. (get_conf_stat_old): Renamed from get_conf_stat (modify_conf_info): New RPC function. (set_expire): New RPC function. * src/server/call-switch.awk: Parse aux_item_list. * src/server/async.h: Added ay_new_text, ay_deleted_text. Renamed old ay_new_text to ay_new_text_old. * src/server/admin.c (modify_server_info): New RPC function. (toplevel): Update initializer for kom_info. (all): Set err_stat whenever kom_errno is set. (get_info): New function. Old get_info is not get_info_old. (get_collate_table): New RPC function. * src/server/Makefile.src: Added the new files to source lists. Rules to build aux-item-parser and scanner added. * src/libraries/libcommon/misc-parser.h: Added m_bcc_recpt to Misc_struct_type. Added bcc_recipient to Misc_info_group struct. * src/include/services.h: Declared all new RPC functions and renamed the now obsolete ones. New functions are: create_person, create_conf, create_text, get_conf_stat, get_text_stat, create_anonymous_text, modify_conf_info, modify_text_info, get_info, modify_server_info, get_collate_table, set_expire, query_predefined_aux_items * src/include/kom-errno.h (KOM_err): Added KOM_ILL_AUX, KOM_AUX_PERM, KOM_UNKNOWN_ASYNC, KOM_INTERNAL_ERROR, KOM_FEATURE_DISABLED, KOM_MESSAGE_NOT_SENT. * src/include/config.h: Added AUX_DEF_FILE. * run-support/Makefile.src: Install aux-items.conf. * doc/man/lyskomd.8: Documented aux-item related settings. * doc/lyskomd-database-format: Documented data file version 2. * doc/Protocol-A.texi: Completed all calls, asynch messages, data structures, error codes. Documented protocol version 10. * db-crypt/db/lyskomd-data: Updated to data file version 2. * configure.in: Check for bison and flex (can't use the regular YACC and LEX tests since we need bison and flex specifically.) * INSTALL: Mention that bison and flex may be needed for installation. Wed Jul 23 22:40:08 1997 Per Cederqvist * src/server/conference.c (get_uconf_stat): Added a comment about a bug that needs to be fixed. Sun Jul 20 16:04:23 1997 Per Cederqvist The regexp code could use the wrong collate table. * src/server/regex-match.c (lookup_regexp): Use DEFAULT_COLLAT_TAB, not swedish_collate_tab. (Reported by David Byers). Fri Jun 6 23:16:28 1997 Per Cederqvist Port to AIX. * src/server/local-to-global.c: Include stdlib.h instead of the non-standard malloc.h. * configure.in: Create src/server/Makefile before src/server/testsuite/Makefile. Sun Dec 29 15:55:44 1996 Per Cederqvist * doc/prot-A.txt: 59=create-anonymous-text, 78=get-uconf-stat, 58=get-last-text and 77=set-last-read are recommended, not experimental. Fixed bug in declaration of Dynamic-Session-Info-List. * src/server/Makefile.in (GENOBJS): Added local-to-global.o. Thu Sep 12 19:14:39 1996 Inge Wallin * local-to-global.h: Added code for an iterator. * local-to-global.c: Added code for an iterator. * kom-types.h: Include some files which are used here. Sun Sep 1 21:32:22 1996 Inge Wallin * (l2g_delete): Delete the block if empty. * local-to-global.c (delete_block): New function * local-to-global.c (l2g_destruct): Don't free blocks. * (l2g_clear): Only free if non-NULL. * (l2g_copy): more efficient code. * local-to-global.h, local-to-global.c (l2g_print): Renamed to l2g_write. * (l2g_read, l2g_write): Now implemented. * log.h: Include stdarg.h if possible. Sun Aug 25 14:47:16 1996 Per Cederqvist * src/server/Makefile.src (GENOBJS): Added local-to-global.o. * src/server/local-to-global.c: New file, written by Inge Wallin. Disconnect spamming clients: * src/server/prot-a-parse.c (prot_a_get_token): Disconnect the client if it attempts to send a token (other than a string) that is longer than 1000 characters. Delete obsolete code: * src/libraries/libcommon/kom-errno.c (kom_perror): Removed KOM_NO_CONNECT. * src/include/kom-errno.h (Kom_err): Removed the unused value KOM_NO_CONNECT. Purify support: * scripts/mkmi.m4 (PURIFY): New make variable. * configure.in: New argument --with-purify enables debugging with Purify. * src/server/Makefile.src (lyskomd): Added $(PURIFY) in front of the link line. (updateLysKOM): Likewise. (dbck): Likewise. * src/server/local-to-global.c: Include , and "s-string.h". (l2g_next_key): Don't dereference memory past the last block! Test suite integration: * configure.in: Generate src/server/testsuite/Makefile. Touch src/server/testsuite/dependencies. * src/server/testsuite/Makefile.src: New file. * mkmi: Added src/server/testsuite/Makefile. * src/server/testsuite/l2g.0/00.exp: New file. * src/server/testsuite/l2g.0/01.exp: New file, containing real data from the map of conference 603 (LysKOM; Elispklientens buggrapporter) in LysLysKOM. * src/server/testsuite/config/unix.exp: New file. * src/server/testsuite/test-l2g.c: New file. * For older changes, see ChangeLog.1, src/include/ChangeLog.1, src/server/ChangeLog.1, src/libraries/libcommon/ChangeLog.1, and src/libraries/libmisc/ChangeLog.1. Starting today, all changes in those directories should be documented in this file. Not that local changes to foreign libraries that are included in this distribution should still be documented in a ChangeLog in their directory, so that somebody who looks at them can see what we have modified. As of this writing, the following ChangeLog files fall into this category: src/libraries/gnumalloc/ChangeLog, src/libraries/libisc-new/src/ChangeLog, src/libraries/regex/ChangeLog and src/libraries/regex/test/ChangeLog.