1. 06 Aug, 2006 7 commits
    • Per Cederqvist's avatar
      Document the database process. (Bug 144, partially) · 470ed77b
      Per Cederqvist authored
      * doc/lyskomd.texi (The Database): Translated old Swedish text
      that describes how the database is implemented to English.
      Updated the description to match the current implementation.
    • Per Cederqvist's avatar
      Log changed names. · 2a6fc07b
      Per Cederqvist authored
      * src/server/conference.c: Don't include s-string.h twice, but do
      include string-malloc.h.
      (change_name): Log the old and new name, and the user that changes
      * src/server/testsuite/lyskomd.0/03.exp: Be prepared for the new
      log message.
      * src/server/testsuite/lyskomd.0/06.exp: Ditto.
      * src/server/testsuite/lyskomd.0/13.exp: Ditto.
      * src/server/testsuite/lyskomd.0/send-async-cov.exp: Ditto.
    • Per Cederqvist's avatar
      Improve doc. (Bug 144, partially). · 09b82590
      Per Cederqvist authored
      * doc/lyskomd.texi (Parameters): Document "Max mark_as_read
      chunks" and "Max super_conf loop".
    • Per Cederqvist's avatar
      Code cleanup. · d5158e06
      Per Cederqvist authored
      * src/server/conf-file.c (check_trailer): New function.
      (convert_to_long): Use it to simplify the code.
      (convert_to_ulong): Ditto.
    • Per Cederqvist's avatar
      Use strtol instead of atol in more places, and avoid a compiler · 64852bbd
      Per Cederqvist authored
      warning.  (Bug 143).
      * src/server/conf-file.c (convert_to_ulong): New function.
      (assign_text_no): Use it instead of convert_to_long to get rid of
      a compiler warning.
      (assign_ulong): Use convert_to_ulong instead of atol.
      (assign_uint): Ditto.  Check for overflow.
    • Per Cederqvist's avatar
      Use strtol instead of atol. (Bug 143). · 26856e25
      Per Cederqvist authored
      * src/server/conf-file.c (convert_to_long): New function.
      (assign_text_no): Use it instead of using atol.  Check for
      (assign_conf_no): Ditto.
      (assign_int): Ditto.
    • Per Cederqvist's avatar
      Log a message when a conference (or person) is deleted. · e2ad881d
      Per Cederqvist authored
      * src/server/conference.c (delete_conf): Log a message when a
      conference is deleted, which includes the name of the conference
      and the user ID of the person that performs the deletion.
      * src/server/testsuite/config/prot-a.exp (kom_delete_conf): Expect
      the above message.
      * src/server/testsuite/lyskomd.0/03.exp: Ditto.
      * src/server/testsuite/lyskomd.0/13.exp: Ditto.
      * src/server/testsuite/lyskomd.0/32.exp: Ditto.
      * src/server/testsuite/lyskomd.0/conference-cov.exp: Ditto.
      * src/server/testsuite/lyskomd.0/person-cov.exp: Ditto.
  2. 02 May, 2006 1 commit
  3. 24 Apr, 2006 1 commit
    • Per Cederqvist's avatar
      Tell svn to ignore core files. · e37c8984
      Per Cederqvist authored
      * src/server/testsuite: Ignore core and vgcore.*.
      Replaced the "Client host" and "Client port" configuration file
      parameters with "Listen", and allow lyskomd to listen to more than
      one port.
      * doc/lyskomd.texi (Parameters): Replaced "Client host" and
      "Client port" with "Listen".
      * src/server/ramkomd.c (start_listen_sockets): New static
      function.  Listen to all the ports specified by the "Listen:"
      (server_init): Use start_listen_sockets() instead of calling
      isc_listentcp().  Removed the host and client_port arguments.  All
      callers updated.
      * src/server/testsuite/lyskomd.0/54.exp: New test suite.
      * src/server/conf-file.c (ctor_ipport_list): New static function.
      (dtor_ipport_list): New static function.
      (assign_ipport_list): New static function.
      (cf_ipport_list): New constant.
      * src/server/conf-file.h (struct ipport_entry): New struct.
      (struct ipport_list): New struct.
      (cf_ipport_list): New constant.
      * src/server/param.h (struct kom_par): Replaced "ip_client_host"
      and "ip_client_port" with "listen".
      * src/server/server-config.c (parameters): Ditto.
      * src/server/prot-a-parse-arg-c.awk: Include "conf-file.h" from
      the generated files.
      * src/server/admin.c: Include "conf-file.h".
      * src/server/aux-items.c: Ditto.
      * src/server/checkkomspace.c: Ditto.
      * src/server/conference.c: Ditto.
      * src/server/connections.c: Ditto.
      * src/server/dbck-cache.c: Ditto.
      * src/server/dbck.c: Ditto.
      * src/server/disk-end-of-atomic.c: Ditto.
      * src/server/komrunning.c: Ditto.
      * src/server/lockdb.c: Ditto.
      * src/server/membership.c: Ditto.
      * src/server/person.c: Ditto.
      * src/server/prot-a-output.c: Ditto.
      * src/server/prot-a-parse.c: Ditto.
      * src/server/prot-a.c: Ditto.
      * src/server/regex-match.c: Ditto.
      * src/server/rfc931.c: Ditto.
      * src/server/send-async.c: Ditto.
      * src/server/session.c: Ditto.
      * src/server/simple-cache.c: Ditto.
      * src/server/splitkomdb.c: Ditto.
      * src/server/text-garb.c: Ditto.
      * src/server/text.c: Ditto.
      * src/server/updateLysKOM.c: Ditto.
      * run-support/config: Removed the "Client port" setting.
      Adjust the test suite for the above change.
      * src/server/testsuite/lyskomd.0/bug-64.exp: Expect memory leaks
      due to bug 1599.
      * src/server/testsuite/lyskomd.0/53.exp: Expect a more informative
      error message when isc_listentcp fails.
      * src/server/testsuite/lyskomd.0/11.exp: Expect an IP address in
      the "Listening for clients" log message.
      * src/server/testsuite/config/unix.exp (clientport_2): New
      (clientport_3): New constant.
      (lyskomd_start): New argument: listen_messages.  Use "Listen:"
      instead of "Client port:".
      (lyskomd_fail_start): Use "Listen:" instead of "Client port:".
      (client_start): New optional argument: port.
  4. 09 Feb, 2006 1 commit
    • Per Cederqvist's avatar
      Added valgrind suppressions for optimised code. · 4c6723a9
      Per Cederqvist authored
      * src/server/testsuite/lyskomd.supp (aid_lexer_opt): New
      (aid_lexer_2_opt): Ditto.
      New test case: start lyskomd while the socket is bound.
      * src/server/testsuite/lyskomd.0/53.exp: New test case.  Test
      startup when the socket is already bound by another process.  This
      exposed a memory leak in libisc which is also fixed in this
      * src/server/testsuite/tcpbind.py: New helper script.  Bind a tcp
      port, so that it is occupied.  Used by 53.exp.
      * src/server/testsuite/config/unix.exp (lyskomd_fail_start): New
      optional argument. expected_leaks.  Fix database setup.  Remove
      the server from expect_after and expect_always once it has failed.
      (utility_start): New function.
      (utility_death): New function.
      (talk_to): Handle talking to utilities.
      Use strerror() instead of logging a plain errno integer.
      * src/server/lockdb.c (lock_db): Use strerror() to get a
      human-readable error message.
      Fixed a memory leak.
      * src/libraries/libisc-new/src/isc_tcp.c (mkaddr_and_bind):
      New static function, extracted from isc_bindtcp().  Don't leak
      the isc_address if bind() fails.
      (isc_bindtcp): Moved some code to mkaddr_and_bind().
  5. 02 Feb, 2006 2 commits
    • Per Cederqvist's avatar
      Log when the test suite lock is obtained and released. · 339ba117
      Per Cederqvist authored
      * src/server/testsuite/locksuite.py (now): New function.
      (main): Include a timestamp in the "locked" and "bye" messages.
      * src/server/testsuite/config/unix.exp (obtain_lock): Log when the
      lock is obtained.  Log a warning if the expect statement should be
      exited for unexpected reasons.
      (release_lock): Log when the lock is released.
      Fix a minor memory leak.
      * src/server/conf-file.c (read_config): Fix a memory leak when the
      config file was not found.
    • Per Cederqvist's avatar
      Compilation error fix. · 1ae97fc1
      Per Cederqvist authored
      * src/server/server-config.c (dump_cfg_timevals): Updated to the
      changes in struct datatype introduced yesterday.
  6. 01 Feb, 2006 6 commits
    • Per Cederqvist's avatar
      Configuration cleanup: use constructor/destructor semantics. · 7a036fc7
      Per Cederqvist authored
      * src/server/conf-file.h (struct datatype): Replaced the freer
      attribute with ctor and dtor attributes.  All users updated.
      Added some documentation.
      (free_config): New function.
      * src/server/conf-file.c (init_init): Call the constructors for
      all parameters.
      (free_config): New function, that calls the destructors for all
      (ctor_string): New static function. 
      (dtor_string): New static function, which replaces
      (assign_string): Expect the object to already be constructed.
      (unassign_string): Removed.
      (cf_string): Use ctor_string and dtor_string.
      * src/server/server-config.c (cf_log_param): Updated for new
      struct datatype.
      (cf_jubel): Ditto.
      (cf_ident_param): Ditto.
      (free_configuration): Use free_config to do the work.
    • Per Cederqvist's avatar
      Namespace cleanup. · 2c7bc938
      Per Cederqvist authored
      * src/server/conf-file.c: Moved all struct datatype objects to the
      end of the file, to avoid having to forward-declare all of the
      static functions mentioned below.
      (assign_text_no): Now static.
      (assign_conf_no): Ditto.
      (assign_int): Ditto.
      (assign_ulong): Ditto.
      (assign_uint): Ditto.
      (assign_string): Ditto.
      (assign_bool): Ditto.
      (assign_double): Ditto.
      (assign_timeval): Ditto.
      (unassign_string): Ditto.
      * src/server/conf-file.h: Don't declare the above functions, which
      are now static.
    • Per Cederqvist's avatar
      Fixed a typo. · 307e1e6e
      Per Cederqvist authored
      * src/intern.h (isc_relocate_fd): Fixed typo in a comment.
    • Per Cederqvist's avatar
      Configuration file definitions: use a datatype struct, instead of · 5adef99d
      Per Cederqvist authored
      having separate "assigner" and "freer" fields in the parameter
      definition table.
      * src/server/conf-file.h (struct datatype): New struct.
      (struct parameter): Move the assigner and freer fields to struct
      datatype, and include a pointer to a const struct datatype.
      * src/server/conf-file.c, src/server/conf-file.h
      (cf_text_no): New constant struct.
      (cf_conf_no): Ditto.
      (cf_int): Ditto.
      (cf_ulong): Ditto.
      (cf_uint): Ditto.
      (cf_string): Ditto.
      (cf_bool): Ditto.
      (cf_double): Ditto.
      (cf_timeval): Ditto.
      * src/server/conf-file.c (assign_defaults): Handle configuration
      (configure_line): Ditto.
      * src/server/server-config.c (assign_path): Removed.
      (unassign_path): Removed.
      (cf_path): New. Replaces assign_path and unassign_path.
      (cf_log_param): New const struct.
      (cf_jubel): New const struct.
      (cf_ident_param): New const struct.
      (parameters): Replaced all assigners and freers with the pointers
      to the proper datatype structs.
      (free_configuration): Handle configuration datatypes.
    • Per Cederqvist's avatar
      Made HACKING more future-proof. · 8af205cf
      Per Cederqvist authored
      * HACKING: Refer to kom.lysator.liu.se instead of u137 (which has
      been replaced by compulsion for some time).
    • Per Cederqvist's avatar
      Removed a redundant xenofarm result file. · 794c5944
      Per Cederqvist authored
      * scripts/xenofarm.sh: Don't create the makeinfo.txt file.  The
      information in it was already present in the id_txlog.txt file
      created by id_tx.
  7. 03 Jan, 2006 3 commits
    • Per Cederqvist's avatar
      Fixed a use-after-free error found by valgrind. This could only · 5511e2a7
      Per Cederqvist authored
      be triggered by a broken aux-item definition file, so it was
      mostly harmless.
      * src/server/aux-item-def-parse.y (aux_item_def_check_validate):
      Don't free a string before using it.
    • Per Cederqvist's avatar
      Fixed a use-after-free error found by valgrind. This could only · 225b29e4
      Per Cederqvist authored
      be triggered by a broken aux-item definition file, so it was
      mostly harmless.
      * src/server/aux-item-def-parse.y (aux_item_def_check_trigger):
      Don't free a string before using it.
    • Per Cederqvist's avatar
      Fixed various harmless memory and file descriptor leaks found by · afb8f103
      Per Cederqvist authored
      * 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
      * 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
      * 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.
  8. 02 Jan, 2006 3 commits
  9. 01 Jan, 2006 2 commits
  10. 28 Dec, 2005 2 commits
    • Per Cederqvist's avatar
      Cleanup of simple-cache.c. (Bug 172). Allocate less memory when · dc65390c
      Per Cederqvist authored
      performing a pattern name match.  
      * src/server/simple-cache.c: Removed obsolete comments.  Fixed
      spelling errors in comments.
      (find_matching_info_compare): Don't overflow if a Conf_no doesn't
      fit in an int.
      (find_matching_info): Removed obsolete comments (bug 172).
      (rebuild_matching_info_entry): Added a comment that explains a
      magic "2" in the code.
      (build_matching_info): Use cached_no_of_existing_conferences()
      instead of next_free_num when deciding how large temporary table
      we need.  Reduce the number of loop induction variables.
      (cached_lookup_name): Made code more readable by introducing a
      temporary variable.
    • Per Cederqvist's avatar
      Improved test suite logging. · efeacc85
      Per Cederqvist authored
      * src/server/testsuite/config/unix.exp (simple_expect): Log what
      we are looking for and when we are done looking at verbosity level
      2 and above.
  11. 27 Dec, 2005 10 commits
    • Per Cederqvist's avatar
      Add a testsuite temporary file to svn:ignore. · edffbeda
      Per Cederqvist authored
      * src/server/testsuite: Add locksuite.lock to svn:ignore.
    • Per Cederqvist's avatar
      Don't overestimate the number of conferences as next_free_num when · ed41d632
      Per Cederqvist authored
      allocating certain data structures.  (Bug 164).
      * src/server/simple-cache.c (existing_confs): New static
      (cached_no_of_existing_conferences): Return existing_confs,
      instead of overestimating the number of conferences as
      next_free_num.  (Bug 164).
      (cached_create_conf): Increase existing_confs.
      (cached_delete_conf): Decrease existing_confs.
      (init_cache): Increase existing_confs when a new conference is
      (free_all_cache): Decrease existing_confs when conferences are
      (dump_cache_mem_usage): Dump existing_confs.
      * src/server/testsuite/config/unix.exp (check_memory_usage): Check
      the dump of existing_confs.  Fail if allocated_strings or
      allocated_blocks isn't found in the file.
    • Per Cederqvist's avatar
      Simplified the name parsing routing, and save some small amount of · 55499424
      Per Cederqvist authored
      memory, by removing the priority field of Matching_info.
      * src/libraries/libcommon/parser.c (parse): Don't let the priority
      influence the match.  The priority functionality was poorly
      documented, not used by lyskomd, and made the code more complex.
      * src/libraries/libcommon/parser.h (Matching_info): Removed the
      priority field, which is no longer used.
      * src/server/simple-cache.c (rebuild_matching_info_entry): Don't
      initialize the priority field.
      (build_matching_info): Ditto.
    • Per Cederqvist's avatar
      Minor code cleanup. · c8c248e0
      Per Cederqvist authored
      * src/libraries/libcommon/parser.c (parse): Code cleanup: get rid
      of one level of indentation, and avoid using multiple ways to get
      to the next iteration of the main loop.
    • Per Cederqvist's avatar
      Fixed old typo in the ChangeLog. · e59d09df
      Per Cederqvist authored
    • Per Cederqvist's avatar
      Writing to a client that was disconnecting and blocked could cause · 3aaff933
      Per Cederqvist authored
      the server to crash.  (Bug 1403).
      * src/server/connections.c (check_idle_callback): Don't crash if
      isc_enable() fails.  Emit the session number in the log, mostly
      for debug purposes.
    • Per Cederqvist's avatar
      Add automake-generated files to svn:ignore. · d4ad19a5
      Per Cederqvist authored
      * scripts: Add depcomp, install-sh, mdate-sh, missing,
      mkinstalldirs and texinfo.tex to svn:ignore.
      * src/libraries/adns: Add depcomp, missing,  and mkinstalldirs to
      * src/libraries/libisc-new: Add depcomp to svn:ignore.
      * src/libraries/liboop: Add depcomp, install-sh, missing and
      mkinstalldirs to svn:ignore.
    • Per Cederqvist's avatar
      Add TAGS to svn:ignore. · acc319ea
      Per Cederqvist authored
    • Per Cederqvist's avatar
      Don't hang if "Use DNS" is off. (Bug 1318.) Thanks to Rasmus · 3e987837
      Per Cederqvist authored
      Sten who reported the bug and proposed an alternate fix.
      * src/server/connections.c (login_request): Don't hang if the "Use
      DNS" option is false.  (Bug 1318).  Log a warning message if
      isc_resolve_remote() fails.
      (src/server/testsuite/lyskomd.0/bug-1318.exp): New file.  Test the
      "Use DNS: off" configuration option.
    • Per Cederqvist's avatar
      "make check" without a previous "make" failed, because · efa7c6b0
      Per Cederqvist authored
      checkkomspace was not built early enough.  Also, the test suite
      should not fail on platforms that don't support fsusage.c.
      * src/server/Makefile.am (CHECKKOMSPACE): New empty variable.
      Append checkkomspace$(EXEEXT) to it if we HAVE_FSUSAGE.
      (check-lyskomd): Depend on $(CHECKKOMSPACE).
      (check-recursive): Ditto.
      * src/server/testsuite/lyskomd.0/50.exp: Report "unsupported" if
      checkkomspace is not built.  (Don't fail with fatal errors.)
  12. 19 Dec, 2005 2 commits