- 08 Jul, 2010 1 commit
-
-
Per Cederqvist authored
* src/include/kom-types.h (Text_stat): Remove the reclamation field. It was a mistake to add it 2006-11-06. * src/server/dbck-cache.c (cached_flush_text): Don't touch reclamation. * src/server/memory.c (copy_text_stat): Ditto. (init_text_stat): Ditto. * src/server/ram-output.c (foutput_text_stat_3): Ditto. * src/server/ram-parse.c (fparse_text_stat_3): Ditto. (fparse_text_stat_2): Ditto. (fparse_text_stat_0): Ditto. * src/server/simple-cache.c (cached_create_text): Ditto.
-
- 06 Nov, 2006 1 commit
-
-
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.
-
- 20 Oct, 2006 1 commit
-
-
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.
-
- 03 Jan, 2006 1 commit
-
-
Per Cederqvist authored
valgrind. * src/server/testsuite/lyskomd.supp: Added aid_lexer_2. * src/server/testsuite/lyskomd.0/regexp-match-cov.exp (shutdown): Don't expect any suppressed leaked blocks. * src/server/testsuite/lyskomd.0/aux-items-cov.exp: Expect less suppressed leaked blocks. * src/server/testsuite/lyskomd.0/37.exp: Adjusted to new report format when configuration errors are found. * src/server/testsuite/lyskomd.0/conf-file-cov.exp: Ditto. * src/server/simple-cache.c (free_all_cache): Close text_file and file_a. * src/server/testsuite/lyskomd.supp: Removed i_fopen-2.3.1 and i_fopen-2.3.5, which were actually caused by the above problem. * src/server/server-config.c (read_configuration): Check the return value of read_config(). Free the configuration before calling restart_kom if there are any problems with the configuration. Report the name of the configuation file if problems are found. * src/server/ramkomd.c (dump_exit_statistics): Call clear_info() instead of free_kom_info. (free_kom_info): Removed. The new clear_info() function contains a better implementation, with less code duplication. * src/server/memory.c, src/server/kom-memory.h (clear_info): New function. * src/server/dbck.c (free_person_scratchpad): New static function. (free_person_scratch): Ditto. (main): Call free_person_scratch(), clear_info(), free_configuration() and free_all_dbck_cache() when terminating to make it possible to check for leaks with valgrind. * src/server/dbck-cache.c, src/server/dbck-cache.h (free_all_dbck_cache): New function. * src/server/conf-file.c, src/server/conf-file.h (read_config): Changed return type from void to Success. Return FAILURE instead of calling restart_kom when configuration errors are found.
-
- 23 Aug, 2003 1 commit
-
-
Per Cederqvist authored
-
- 16 Aug, 2003 1 commit
-
-
Per Cederqvist authored
-
- 12 Jul, 2003 1 commit
-
-
Per Cederqvist authored
<sys/time.h> directly.
-
- 23 Mar, 2003 1 commit
-
-
Per Cederqvist authored
is NULL.
-
- 12 Jan, 2003 1 commit
-
-
Per Cederqvist authored
-
- 06 Nov, 2002 1 commit
-
-
Per Cederqvist authored
(copy_membership): Ditto. (init_membership): Ditto.
-
- 27 Oct, 2002 1 commit
-
-
Per Cederqvist authored
message.
-
- 02 Aug, 2002 1 commit
-
-
Per Cederqvist authored
to the database file, and we make valgrind happy. The junk was never used, so this is not a bugfix.
-
- 29 Mar, 2002 1 commit
-
-
Per Cederqvist authored
-
- 01 Jan, 2002 1 commit
-
-
Per Cederqvist authored
-
- 28 Dec, 2001 1 commit
-
-
Per Cederqvist authored
-
- 04 Nov, 2001 1 commit
-
-
Per Cederqvist authored
-
- 03 Jun, 1999 1 commit
-
-
Per Cederqvist authored
-
- 24 May, 1999 2 commits
-
-
David Byers authored
-
Per Cederqvist authored
-
- 21 May, 1999 1 commit
-
-
David Byers authored
Free everything on exit The server should now exit with zero allocated strings and zero allocated blocks. Test cases Added a few test cases for improved coverage and recently fixed bugs.
-
- 12 May, 1999 1 commit
-
-
David Byers authored
set-pers-flags Modified RPC calls create-person (new parameter pers-flags) Removed several hard-coded constants and paths. Max texts Max conferences Nologin file Support for aux-item validation functions (not just regexps.) Support for aux-items that can only be created by the server Support for linking pairs of aux items Added test cases to improve code coverage Renamed log to kom_log to avoid conflicts with math function log. Several bug fixes (code and documentation)
-
- 05 Apr, 1999 1 commit
-
-
Per Cederqvist authored
(free_person): Likewise.
-
- 13 Jan, 1999 1 commit
-
-
David Byers authored
-
- 01 Jan, 1999 1 commit
-
-
Per Cederqvist authored
-
- 26 Dec, 1998 1 commit
-
-
David Byers authored
-
- 14 Nov, 1998 1 commit
-
-
Per Cederqvist authored
-
- 09 Nov, 1998 1 commit
-
-
Per Cederqvist authored
-
- 17 Oct, 1998 1 commit
-
-
Per Cederqvist authored
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.
-
- 26 Jul, 1998 1 commit
-
-
Per Cederqvist authored
(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.
-
- 08 Jul, 1998 1 commit
-
-
Per Cederqvist authored
-
- 14 Jun, 1998 1 commit
-
-
David Byers authored
-
- 23 Oct, 1997 1 commit
-
-
David Byers authored
Some initial (nonworking) code for a one-pass sync.
-
- 13 Sep, 1997 1 commit
-
-
David Byers authored
Documented the aux-item definition file format. Updated the database format documentation. Server: Implemented aux-items. Checked error returns and set error-status to something useful in most cases. New RPC calls: 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 get-collate-table set-expire query-unread-texts New asynchronous messages: new-text deleted-text
-
- 03 Aug, 1996 1 commit
-
-
Per Cederqvist authored
-
- 02 Aug, 1996 2 commits
-
-
Per Cederqvist authored
-
Per Cederqvist authored
(init_static_session_info): New function.
-
- 05 Apr, 1994 1 commit
-
-
Per Cederqvist authored
-
- 19 Feb, 1994 1 commit
-
-
Per Cederqvist authored
-
- 18 Oct, 1993 1 commit
-
-
Per Cederqvist authored
any files.
-
- 16 Oct, 1993 1 commit
-
-
Per Cederqvist authored
-