- Jun 19, 2010
-
-
Per Cederqvist authored
This causes "make check" to fail quickly if running on an expect that has broken handling of zero-lenght writes, or if expect is really, really slow due to broken glob gate. * src/server/testsuite/Makefile.am (check-l2g): Depend on working-dejagnu. (check-lyskomd): Ditto. (check-leaks): Ditto. (working-dejagnu): New target. (EXTRA_DIST): Added dejagnu.0/00-zero-length-write.exp and dejagnu.0/90-slow-glob-gate.exp. * src/server/testsuite/dejagnu.0/00-zero-length-write.exp: New test, that fails on known bad versions of expect. * src/server/testsuite/dejagnu.0/90-slow-glob-gate.exp: New test, that fails if a simple regexp pattern causes expect to run too slow, indicating that it is converted to a glob pattern that causes a lot of backtracking. * src/server/testsuite/.gitignore: Ignore dejagnu.log and dejagnu.sum.
-
- May 23, 2010
-
-
Per Cederqvist authored
* src/server/testsuite/Makefile.am (site.exp): Set use_dns to yes or no depending on if adnshost can resolve 127.0.0.1 or not. * src/server/testsuite/config/unix.exp (lyskomd_start): Set the "Use DNS" configuration depending on the use_dns setting from site.exp.
-
- May 22, 2010
-
-
Per Cederqvist authored
* doc/lyskomd.texi (Parameters): DNS has been unblocking since version 2.1.0, so don't state that it blocks the server.
-
- Apr 18, 2010
-
-
Per Cederqvist authored
* doc/Protocol-A.texi: Don't use "@begin tex" instead of "@tex". That construct worked in texinfo.tex version 2003-11-16.09, but support was removed in 2003-11-29.14.
-
- Mar 31, 2010
-
-
Per Cederqvist authored
* src/server/testsuite/timeval-overflow.c (main): Now a tiny bit more portable. This code still violates the C standard, but at least it works as intended in gcc 4.4.1 now. The old code was optimized to an eternal loop. :-)
-
Per Cederqvist authored
* src/server/testsuite/config/unix.exp (lyskomd_start): Turn on the garb, unless the test case explicitly disables it.
-
Per Cederqvist authored
-
- Mar 30, 2010
-
-
Per Cederqvist authored
-
Per Cederqvist authored
-
Per Cederqvist authored
-
- Oct 12, 2009
-
-
Per Cederqvist authored
-
- Oct 06, 2009
-
-
Per Cederqvist authored
-
- May 31, 2009
-
-
Per Cederqvist authored
* doc/lyskomd.texi (File Object Types): New node. (File Types): New node.
-
Per Cederqvist authored
* doc/lyskomd.texi (Hacking): Fill in descriptions in the menu.
-
Per Cederqvist authored
* src/server/ram-io.c (set_output_format): Handle format 3.
-
Per Cederqvist authored
* src/server/simple-cache.c (cached_create_text), * src/server/text.c (do_create_text), * src/server/testsuite/get-time-often.c (read_server): Fixed typos in comments.
-
Per Cederqvist authored
* src/server/ram-smalloc.c: Added a missing newline.
-
Per Cederqvist authored
* src/server/testsuite/lyskomd.0/03.exp: Fix a race condition by sleeping one second.
-
Per Cederqvist authored
* src/server/ram-parse.c (fskipwhite): Don't unget EOF.
-
- Mar 31, 2008
-
-
Per Cederqvist authored
* doc/lyskomd.texi (Parameters): Changed "Garb" from "on" to "off". (Administration): Suggest that the administrator may want to turn on the garb. * src/server/server-config.c (parameters): Changed "Garb" from "on" to "off".
-
- Jul 14, 2007
-
-
Per Cederqvist authored
* doc/lyskomd.texi (Files): The lyskomd.clients example line was missing the third field. Fix.
-
- Jul 03, 2007
-
-
Per Cederqvist authored
use them. * src/server/ram-io.c, src/server/ram-io.h (dbfile_putc): New function. (dbfile_fputs): New function. (dbfile_feof): New function. (dbfile_ferror): New function. * src/server/simple-cache.c (save_one_text): Use dbfile_ferror. (sync_part): Ditto. * src/server/ram-output.c (foutput_string): Use dbfile_putc. (foutput_ulong): Ditto. (foutput_atsign): Ditto. (foutput_newline): Ditto. (foutput_space): Ditto. (foutput_bool): Ditto. (foutput_array_start): Use dbfile_fputs. (foutput_array_end): Ditto. (foutput_array_nodata): Ditto. * src/server/ram-io.c (dbfile_change_magic): Use dbfile_ferror. * src/server/local-to-global.c (l2g_write): Use dbfile_putc. * src/server/dbck-cache.c (init_cache): Use dbfile_feof().
-
Per Cederqvist authored
that changes the state to dbfile_change_magic(). Reduce code duplication by teaching foutput_header() to handle old file formats. * src/server/simple-cache.c (pre_sync): Adjusted to new API of dbfile_open_write(), including removing calls to foutput_header(). (save_one_text): Extracted parts of the functionality to dbfile_change_magic(). * src/server/ram-output.c (foutput_header): Moved support for file formats 0, 1 and 2 here from sync_output_header(). * src/server/ram-io.c, src/server/ram-io.h (dbfile_open_write): New argument: magic. Write a file header with the specified state. (dbfile_change_magic): New function, extracted from cache_sync_all() in dbck-cache.c and save_one_text(). * src/server/dbck-cache.c (sync_output_header): Removed. The ability to emit old-style headers moved to foutput_header(). (cache_sync_all): Adjusted to new API of dbfile_open_write, including removing calls to sync_output_header(). Use dbfile_change_magic() instead of rewind() and sync_output_header(). * src/server/Makefile.am (libcheck_a_SOURCES): Added server-time.c.
-
Per Cederqvist authored
* regex.c: Removed local variables setting for Emacs.
-
Per Cederqvist authored
* mkmi (WANT_AUTOCONF): Set to 2.5, not 1.5.
-
- Mar 01, 2007
-
-
Per Cederqvist authored
* doc/Protocol-A.texi (The Misc-Info List): Document that it is up to the server to convert bcc-recpt to cc-recpt or to ignore them, when clients use an old-style request. This agrees better with the wordings in get-text-stat-old.
-
- Nov 06, 2006
-
-
Per Cederqvist authored
"generation" and "reclamation" fields. * src/include/kom-types.h (Text_stat): Added fields generation and reclamation. * src/server/simple-cache.c (cached_get_text): Handle text file generation 0 in the old-fashioned way. Added a #warning about other generations. Check return value of fseek. (cached_create_text): Added a #warning about nonzero generations of the text file. (cached_create_text): Initialize generation and reclamation. (save_one_conf): Do a file copy only if the formats of file A and B are the same. Otherwise, parse the object into a temporary object and re-serialize it. (save_one_pers): Ditto. (save_one_text): Ditto. (init_cache): Handle data file format 3. * src/server/ram-parse.c (fparse_text_stat_3): New static function. (fparse_text_stat_2): Set generation and reclamation to 0. (fparse_text_stat_0): Ditto. (fparse_info): Handle data file format 3. (fparse_conference): Ditto. (fparse_person): Ditto. (fparse_membership): Ditto. (fparse_membership_list): Ditto. (fparse_text_stat): Ditto. (fparse_member): Ditto. * src/server/ram-output.c (foutput_info): Handle data file format 3. (foutput_text_stat_3): New static function. (foutput_person): Ditto. (foutput_conference): Ditto. (foutput_text_stat): Ditto. (foutput_membership): Ditto. (foutput_membership_list): Ditto. (foutput_member): Ditto. (foutput_conf_type): Ditto. * src/server/ram-io.c (output_format): Initialize it to 3. (dbfile_open_read): Handle data file format 3. * src/server/memory.c (copy_text_stat): Handle generation and reclamation. (init_text_stat): Initialize generation and reclamation. * src/server/membership.c (read_ranges_postcondition): Use data file format 3 when dumping a membership to stderr. * src/server/dbck.c (main): Handle data file format 3. * src/server/dbck-cache.c (cached_get_text): Handle text file generation 0 in the old-fashioned way. Added a #warning about other generations. (cached_flush_text): Flush a generation 0 text file. Added a #warning about other generations. (sync_output_header): Handle data file format 3. (cache_sync_all): Ditto. (init_cache): Ditto. * src/server/testsuite/test-l2g.c (main): Use data file format 3 when reading an Local2Global structure from stdin, or writing it to stdout.
-
- Oct 20, 2006
-
-
Per Cederqvist authored
"struct dbfile". Add a database version field to that struct, and remove the global database format variables. This allows lyskomd to have files in different versions open at the same time, so that it can convert format X to format X+1 on the fly. (This is more preparation for bug 1616.) * src/server/ram-io.h (struct dbfile): New struct. (dbfile_delete): New function. (set_output_format): New function. (dbfile_open_write): New function. (dbfile_open_read): New function. (dump_dbfile_stats): New function. (dbfile_ftell): The argument is now a struct dbfile*, not FILE*. (dbfile_getc): Ditto. (dbfile_ungetc): Ditto. * src/server/ram-io.c (output_format): Moved from ram-output.c and made static variable. This defines the output format of all struct dbfile objects created after a change to the variable. (nr_dbfile_objects): New static statistics variable. (nr_dbfile_files): New static statistics variable. (dbfile_new): New static function. (dbfile_delete): New function. (set_output_format): Moved from ram-output.c. (get_version): Moved from simple-cache.c. Changed return type to int. The argument is an open dbfile, not a file name. Use dbfile_getc() instead of getc(). (dbfile_open_read): New function. (dbfile_open_write): New function. (dump_dbfile_stats): New function. (dbfile_ftell): The argument is now a struct dbfile*, not FILE*. (dbfile_getc): Ditto. (dbfile_ungetc): Ditto. * src/server/conference.c: Include ram-io.h, since local-to-global.h needs it. * src/server/memory.c: Ditto. * src/server/person.c: Ditto. * src/server/prot-a-output.c: Ditto. * src/server/text.c: Ditto. * src/server/membership.c: Include ram-io.h. (read_ranges_postcondition): Set up a dbfile wrapper around stderr for the report created if check_membership() fails. * src/server/local-to-global.h, src/server/local-to-global.c (l2g_read): The fp argument is now a struct dbfile*, not a FILE*. * src/server/dbck.c (oformat): Removed. The format is stored inside the dbfile struct instead. (main): Report an error message if an attempt to use an undefined output format is detected. * src/server/dbck-cache.c: Change all FILE* that refer to the status files to struct dbfile* in all functions, and made appropriate changes. Use fp->format instead of the global variable oformat or data_file_version. (get_version): Moved to ram-io.c. (sync_output_header): Removed the oformat argument. Use fp->format instead. All callers updated. (cache_sync_all): Use dbfile_open_write() instead of i_fopen(), and dbfile_delete() instead of i_fclose(). (init_cache): Removed the data_file_version variable, as the format is now stored inside the dbfile struct. Use dbfile_open_read() instead of i_fopen(), and dbfile_delete() instead of i_fclose(). * doc/lyskomd.texi (Modifying Stored Types): The default database format is now defined in ram-io.c, and nowhere else. It is preferrable if lyskomd is able to convert an old format to a new one after an upgrade. * src/server/testsuite/test-l2g.c (main): Added a dbfile wrapper around stdin in call to l2g_read(), and another around stderr in call to l2g_write(). * src/server/testsuite/Makefile.am (test_l2g_LDADD): Include libeintr.a. * src/server/simple-cache.c: Change all FILE* that refer to the status files to struct dbfile* in all functions, and made appropriate changes. (pre_sync): Use dbfile_delete() instead of i_fclose(), and dbfile_open_write() instead of i_fopen(). (post_sync): Use dbfile_delete() instead of i_fclose(), and dbfile_open_read() instead of i_fopen(). (save_one_text): Use dbfile_delete() instead of i_fclose(), and dbfile_open_read() instead of i_fopen(). (sync_part): Use dbfile_delete() instead of i_fclose(). (init_cache): Removed local variable datafile_version; use fp->format instead. Use dbfile_open_read() instead of i_fopen(). Removed call to set_input_format(), as dbfile_open_read() does the same thing. (free_all_cache): Use dbfile_delete() instead of i_fclose(). * src/server/ramkomd.c (dump_exit_statistics): Dump dbfile stats. * src/server/ram-parse.h, src/server/ram-parse.c: Change all FILE* that refer to the status files to struct dbfile* in all functions, and made appropriate changes. (set_input_format): Removed. * src/server/ram-parse.c (input_format): Removed. All users changed to use fp->format instead, so that lyskomd can read files with different versions at the same time. (fparse_text_stat_2): Code cleanup. (fparse_text_stat_0): Use dbfile_ungetc() instead of ungetc(). * src/server/ram-output.h, src/server/ram-output.c: Change all FILE* that refer to the status files to struct dbfile* in all functions, and made appropriate changes. (output_format): Moved to ram-io.c and made static. (set_output_format): Moved to ram-io.c.
-
- Oct 19, 2006
-
-
Per Cederqvist authored
foutput_newline(). * src/server/dbck-cache.c (get_version): Use fparse_set_pos() intead of fseek() where appropriate. (init_cache): Ditto. * src/server/simple-cache.c (get_version): Ditto. (pre_sync): Removed dead code. Use foutput_newline() and fparse_set_pos() where appropriate. (save_one_conf): Use foutput_newline() where appropriate. (save_one_pers): Ditto. (save_one_text): Ditto. (init_cache): Use fparse_set_pos() where appropriate.
-
Per Cederqvist authored
* src/server/simple-cache.c (read_person): Use restart_kom instead of kom_log when there is a size mismatch. (read_conference): Ditto. (pre_sync): Log the file name and error message when the file to save in cannot be opened. (init_cache): Improve the error message when the database is in the wrong format.
-
Per Cederqvist authored
* src/server/dbck-cache.c (cache_sync_all): Replaced another fprintf call with a call to foutput_newline.
-
- Oct 18, 2006
-
-
Per Cederqvist authored
time handling. This is more preparation for bug 1616. * src/server/simple-cache.c (sync_output_header): Renamed to foutput_header and moved to ram-output.c. All callers updated. * src/server/ramkomd.c (current_time): Moved to server-time.c. (main): Use set_initial_time instead of calling gettimeofday and accessing current_time directly. * src/server/ram-output.c, src/server/ram-output.h (foutput_header): Renamed from sync_output_header. Use output_format instead of a hardcoding it to 2. * src/server/dbck.c (main): Call set_initial_time(). * src/server/dbck-cache.c (sync_output_header): Use foutput_header to output a format 2 header. * src/server/server-time.c: New file. (current_time): Moved here from ramkomd.c. * src/server/server-time.c, src/server/server-time.h (set_time): Moved here from connections.c. (set_initial_time): New function. * src/server/connections.c (set_ time): Moved to server-time.c. * src/server/Makefile.am (GENOBJS): Added server-time.c. (DBCK): Ditto.
-
- Oct 17, 2006
-
-
Per Cederqvist authored
and use them when accessing database files. This is a preparatory step for introducing "struct dbfile", which will enable lyskomd to manipulate more than one database file format at the same time. That ability is needed for solving bug 1616. * src/server/ram-io.c, src/server/ram-io.h: New files. (dbfile_ftell): New function. (dbfile_getc): New function. (dbfile_ungetc): New function. * src/server/Makefile.am (libcheck_a_SOURCES): Added ram-io.c. (lyskomd_SOURCES): Added ram-io.h and ram-io.c. (DBCK): Added ram-io.h and ram-io.c. * src/server/simple-cache.c (read_person): Check the return value from fparse_set_pos(). (read_conference): Ditto. (read_text_stat): Ditto. (write_conf): New static function. (save_one_conf): Use it to simplify code. (write_text): New static function. (save_one_text): Use it to simplify code. * src/server/ram-parse.h, src/server/ram-parse.c (fparse_set_pos): New function. * src/server/ram-output.c: Include ram-io.h. (foutput_space): New static function. Use it where appropriate. (foutput_bool): Ditto. (foutput_array_start): Ditto. (foutput_array_end): Ditto. (foutput_array_nodata): Ditto. * src/server/ram-output.h, src/server/ram-output.c (foutput_atsign): New function. (foutput_newline): New function. * src/server/dbck-cache.c: Include ram-io.h. Use dbfile_getc() instead of getc(), dbfile_ungetc() instead of ungetc(), and dbfile_ftell() instead of ftell(), when accessing the database file. Use foutput_atsign and foutput_newline when appropriate. * src/server/local-to-global.c: Ditto. * src/server/ram-parse.c: Ditto. * src/server/simple-cache.c: Ditto.
-
- Oct 01, 2006
-
-
Per Cederqvist authored
size. (Bug 168). * src/server/simple-cache.c (read_person): Sanitycheck the supplied size.
-
- Sep 29, 2006
-
-
Per Cederqvist authored
size. (Bug 169). * src/server/simple-cache.c (read_conference): Sanitycheck the supplied size.
-
- Sep 28, 2006
-
-
Per Cederqvist authored
Added error code 62=aux-exists, 63=aux-bad-object, 64=illegal-aux-data, 65=aux-create-only, 66=aux-modify-only, 67=aux-server-only, 68=aux-data-exists and 69=aux-no-such-text. Return proper error codes. (Bug 192). * doc/Protocol-A.texi (Predefined Aux-Item Types): Renamed the error code illegal-aux-item to illegal-aux-item-tag. (create-text): Updated the error code section to mention the aux-related error codes illegal-aux-item-tag, aux-item-permission, aux-exists, aux-bad-object, illegal-aux-data, aux-modify-only, aux-server-only, aux-data-exists and aux-no-such-text instead of only illegal-aux-item and aux-item-permission. Refer to the "Error Codes" node instead of duplicating the reasons here. (create-anonymous-text): Ditto. (create-conf): Ditto. (create-person): Ditto. (modify-text-info): Ditto, but with aux-create-only instead of aux-modify-only. (modify-conf-info): Ditto. (modify-system-info): Ditto. (Error Codes): Renamed error code 48 from illegal-aux-item to illegal-aux-item-tag, and redefine it to not include errors in the data. Added error code 62=aux-exists, 63=aux-bad-object, 64=illegal-aux-data, 65=aux-create-only, 66=aux-modify-only, 67=aux-server-only, 68=aux-data-exists and 69=aux-no-such-text. * doc/Makefile.am (check-doc): Replaced the error code illegal-aux-item with illegal-aux-item-tag and illegal-aux-item-data. * src/include/kom-errno.h (enum kom_err): Renamed KOM_ILL_AUX to KOM_ILL_AUX_TAG. Added KOM_AUX_EXISTS, KOM_AUX_BAD_OBJECT, KOM_ILL_AUX_DATA, KOM_AUX_CREATE_ONLY, KOM_AUX_MODIFY_ONLY, KOM_AUX_SERVER_ONLY, KOM_AUX_DATA_EXISTS and KOM_AUX_NO_SUCH_TEXT. * src/server/aux-items.c (aux_item_validate): Doc added. Added missing punctuation in comments. Set kom_errno to KOM_ILL_AUX_DATA instead of KOM_ILL_AUX when a regexp cannot be compiled or doesn't match an entry, or when a validator fails. (aux_item_add_perm): Document that kom_errno is set on failure. Do not modify kom_errno on success. Track name change of KOM_ILL_AUX_TAG. Set KOM_AUX_MODIFY_ONLY, KOM_AUX_CREATE_ONLY, KOM_AUX_SERVER_ONLY when appropriate (used to be KOM_AUX_PERM). Don't override the error code set by aux_item_check_unique() or aux_item_validate() when any of those check fails. (aux_item_check_unique): Set kom_errno to KOM_AUX_EXISTS or KOM_AUX_DATA_EXISTS on failure (used to sometimes be KOM_ILL_AUX). (text_stat_check_add_aux_item_list): Track name change of KOM_ILL_AUX_TAG. Set kom_errno to KOM_AUX_BAD_OBJECT if the aux-item is not allowed on the active object (used to be KOM_AUX_PERM). (conf_stat_check_add_aux_item_list): Ditto. (system_check_add_aux_item_list): Ditto. (aux_item_validate_existing_text): Set kom_errno to KOM_AUX_NO_SUCH_TEXT instead of NO_SUCH_TEXT. Set it to KOM_ILL_AUX_DATA if the text number is non-numeric. * src/server/testsuite/lyskomd.0/00.exp: Updated the expected error codes for aux-item-related errors. * src/server/testsuite/lyskomd.0/03.exp: Ditto. * src/server/testsuite/lyskomd.0/04.exp: Ditto. * src/server/testsuite/lyskomd.0/14.exp: Ditto. * src/server/testsuite/lyskomd.0/17.exp: Ditto. * src/server/testsuite/lyskomd.0/55.exp: Ditto. * src/server/testsuite/lyskomd.0/aux-items-cov.exp: Ditto. * src/server/testsuite/lyskomd.0/bug-572.exp: Ditto. * src/server/testsuite/lyskomd.0/20.exp: Ditto. Remove the want_illegal_aux_item proc and simplify the code that checks the error codes. * src/server/testsuite/lyskomd.0/23.exp: Ditto. * src/server/testsuite/lyskomd.0/26.exp: Ditto. * src/server/testsuite/lyskomd.0/28.exp: Ditto. Added test cases for handling duplicate faq-text aux-items. * src/server/testsuite/lyskomd.0/21.exp: Added new tests that attempt to set duplicate faq-text aux-items on a conference in various ways, and removing it and re-adding it. Also test adding two different faq-text aux-items at the same time.
-
- Sep 11, 2006
-
-
Per Cederqvist authored
* src/libraries/libcommon/misc-parser.c (parse_next_misc): Initialize bcc_recipient, received_at and is_sent. This gets rid of a gcc-4.1.1 warning. * src/libraries/libcommon/parser.c (parse): Always initialize answer.arguments and answer.indexes, to get rid of a gcc-4.1.1 warning.
-
- Sep 03, 2006
-
-
Per Cederqvist authored
(Preparation for solving bug 327). * doc/lyskomd.texi (Aux-Item Definition File): Renamed the "unique" field to "one-per-person", and clarify what it means. * src/server/aux-item-def-parse.y: Track the name change of the "one-per-person" aux-item field. (parse_aux_item_definitions): Ditto. * run-support/aux-items.conf: Ditto. * src/server/testsuite/leaks.0/lots-aux-items.conf: Ditto. * src/server/testsuite/lyskomd.0/aux-items.conf: Ditto. * src/server/testsuite/lyskomd.0/bug-64.aux: Ditto.
-
- Aug 06, 2006
-
-
Per Cederqvist authored
* src/server/testsuite/l2g.0/09.exp: Added test cases for copying a Local_to_global where the last entry (or entries) has been deleted.
-
Per Cederqvist authored
-