ChangeLog 560 KB
Newer Older
1 2 3 4 5 6
2007-07-14  Per Cederqvist  <ceder@lysator.liu.se>

	Fixed a broken example in the documentation.
	* doc/lyskomd.texi (Files): The lyskomd.clients example line was
	missing the third field.  Fix.

7 8
2007-07-03  Per Cederqvist  <ceder@lysator.liu.se>

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
	Implement dbfile wrappers for putc, fputs, feof and ferror, and
	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().

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
	Let dbfile_open_write() write the file header.  Extract the code
	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's avatar
Per Cederqvist committed
55 56 57 58 59
2007-07-01  Per Cederqvist  <ceder@lysator.liu.se>

	Use a modern autoconf.
	* mkmi (WANT_AUTOCONF): Set to 2.5, not 1.5.

60 61 62 63 64 65 66 67
2007-03-01  Per Cederqvist  <ceder@lysator.liu.se>

	Fix a minor inconsistency in the Protocol A documentation.
	* 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.

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
2006-11-06  Per Cederqvist  <ceder@lysator.liu.se>

	Introduce datafile format version 3.  A textstat contains
	"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.

125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
2006-10-20  Per Cederqvist  <ceder@lysator.liu.se>

	Wrap all file pointers that refer to the database files inside a
	"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.
226

227 228 229 230 231 232 233 234 235 236 237 238 239
	Fixed more missed opportunities to use fparse_set_pos() and
	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.

240 241 242 243 244 245 246 247 248
	Improve logging and error messages.
	* 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.

249 250 251 252
	Fixed a missing opportunity to use foutput_newline.
	* src/server/dbck-cache.c (cache_sync_all): Replaced another
	fprintf call with a call to foutput_newline.

253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
2006-10-18  Per Cederqvist  <ceder@lysator.liu.se>

	Renamed sync_output_header to foutput_header, and clean up the
	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.

277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
2006-10-17  Per Cederqvist  <ceder@lysator.liu.se>

	Added functions wrapper functions around a few stdio functions,
	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.

318 319 320 321 322 323 324
2006-10-01  Per Cederqvist  <ceder@lysator.liu.se>

	Check that conferences read from the database are the expected
	size.  (Bug 168).
	* src/server/simple-cache.c (read_person): Sanitycheck the
	supplied size.

325 326 327 328 329 330 331
2006-09-29  Per Cederqvist  <ceder@lysator.liu.se>

	Check that conferences read from the database are the expected
	size.  (Bug 169).
	* src/server/simple-cache.c (read_conference): Sanitycheck the
	supplied size.

332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409
2006-09-28  Per Cederqvist  <ceder@lysator.liu.se>

	Renamed the error code illegal-aux-item to illegal-aux-item-tag.
	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.

410 411 412 413 414 415 416 417 418 419
2006-09-09  Per Cederqvist  <ceder@lysator.liu.se>

	Get rid of gcc-4.1.1 warnings by initializing more fields.
	* 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.

420 421 422 423 424 425 426 427 428 429 430 431 432 433
2006-09-02  Per Cederqvist  <ceder@lysator.liu.se>

	Rename the aux-item field "unique" to "one-per-person".
	(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.

434 435 436 437 438 439 440
2006-08-04  Per Cederqvist  <ceder@lysator.liu.se>

	Add more test cases for Local_to_global. (Bug 217).
	* 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.

441 442
2006-08-01  Per Cederqvist  <ceder@lysator.liu.se>

443 444 445 446
	More aux-item-related test cases.
	* src/server/testsuite/lyskomd.0/55.exp: Added test cases for
	adding an aux-item to the wrong type of of object.
	
447 448 449 450 451 452 453 454
	Added more test cases for aux-items with restrictions on when they
	can be set.
	* src/server/testsuite/lyskomd.0/55.exp: New file.  Test creation
	of aux-items that are only allowed to be set when modifying or
	creating an object.
	* src/server/testsuite/lyskomd.0/aux-items-55.conf: New file, used
	by 55.exp.

Per Cederqvist's avatar
Per Cederqvist committed
455 456 457 458
	Comment fix.
	* src/server/aux-items.c (aux_item_validate): Fixed a typo in a
	comment.

Per Cederqvist's avatar
Per Cederqvist committed
459 460 461 462 463
	Test suite fix.
	* src/server/testsuite/lyskomd.0/person-cov.exp: Handle the new
	message when a person is deleted, even when debug calls are
	enabled.

Per Cederqvist's avatar
Per Cederqvist committed
464 465 466 467 468 469
	Code cleanup.
	* src/server/aux-items.c (aux_item_check_unique): Removed bogus
	code that find_aux_item_definitions to be needlessly called.
	Force the caller to supply the definition, as all callers already
	do.

470 471 472 473
	Removed code with no effect.  (Bug 142).
	* src/server/aux-items.c (aux_item_link_items): Removed assignment
	to a local variable that is not used after the assignment.

Per Cederqvist's avatar
Per Cederqvist committed
474 475 476 477
	Fixed typo in comment.
	* src/server/testsuite/lyskomd.0/aux-items-cov.exp: Fixed typo in
	comment.

478 479 480 481 482 483
	Removed bogus FIXME comments.  (Bug 141).
	* src/server/aux-items.c (aux_item_link_items): Removed FIXME
	comment about bug 141.  Bug 141 is invalid.  The call to
	mark_text_as_changed is not redundant, since we must mark both the
	source and destination item as changed.

484 485 486 487 488
	Document local-to-global.  (Bug 144).
	* doc/lyskomd.texi (local-to-global): Translated old Swedish text
	that describes the reasoning behind the local-to-global structure,
	and update it to match the current implementation.

489 490 491 492 493 494 495
2006-07-31  Per Cederqvist  <ceder@lysator.liu.se>

	Document the database process.  (Bug 144, partially)
	* 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
Per Cederqvist committed
496 497 498 499 500 501 502 503 504 505 506 507 508
2006-07-27  Per Cederqvist  <ceder@lysator.liu.se>

	Log changed names.
	* 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
	it.
	* 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.

509 510
2006-07-26  Per Cederqvist  <ceder@lysator.liu.se>

511 512 513 514
	Improve doc.  (Bug 144, partially).
	* doc/lyskomd.texi (Parameters): Document "Max mark_as_read
	chunks" and "Max super_conf loop".

Per Cederqvist's avatar
Per Cederqvist committed
515 516 517 518 519
	Code cleanup.
	* src/server/conf-file.c (check_trailer): New function.
	(convert_to_long): Use it to simplify the code.
	(convert_to_ulong): Ditto.
	
520 521 522 523 524 525 526 527
	Use strtol instead of atol in more places, and avoid a compiler
	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.

528 529 530 531 532 533 534
	Use strtol instead of atol.  (Bug 143).
	* src/server/conf-file.c (convert_to_long): New function.
	(assign_text_no): Use it instead of using atol.  Check for
	overflow.
	(assign_conf_no): Ditto.
	(assign_int): Ditto.

535 536 537 538 539 540 541 542 543 544 545 546
	Log a message when a conference (or person) is deleted.
	* 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.

547 548 549 550 551 552 553
2006-04-24  Per Cederqvist  <ceder@lysator.liu.se>

	Tell svn to ignore core files.
	* 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
554
	one port.  (Bug 1112).
555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616
	* 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:"
	parameter.
	(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
	constant.
	(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.

617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641
2006-02-09  Per Cederqvist  <ceder@lysator.liu.se>

	Added valgrind suppressions for optimised code.
	* src/server/testsuite/lyskomd.supp (aid_lexer_opt): New
	suppression.
	(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
	commit.
	* 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.

Per Cederqvist's avatar
Per Cederqvist committed
642 643
2006-02-02  Per Cederqvist  <ceder@lysator.liu.se>

644 645 646 647 648 649 650 651 652 653 654 655
	Log when the test suite lock is obtained and released.
	* 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
Per Cederqvist committed
656 657 658 659
	Compilation error fix.
	* src/server/server-config.c (dump_cfg_timevals): Updated to the
	changes in struct datatype introduced yesterday.

660 661
2006-02-01  Per Cederqvist  <ceder@lysator.liu.se>

662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682
	Configuration cleanup: use constructor/destructor semantics.
	* 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
	parameters.
	(ctor_string): New static function. 
	(dtor_string): New static function, which replaces
	unassign_string.
	(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
Per Cederqvist committed
683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699
	Namespace cleanup.
	* 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.

700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728
	Configuration file definitions: use a datatype struct, instead of
	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
	datatypes.
	(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.

729 730
2006-01-04  Per Cederqvist  <ceder@lysator.liu.se>

731 732 733 734
	Made HACKING more future-proof.
	* HACKING: Refer to kom.lysator.liu.se instead of u137 (which has
	been replaced by compulsion for some time).

735 736 737 738 739
	Removed a redundant xenofarm result file.
	* 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.

740 741
2006-01-03  Per Cederqvist  <ceder@lysator.liu.se>

742 743 744 745 746
	Fixed a use-after-free error found by valgrind.  This could only
	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.
747
	(aux_item_def_check_validate): Ditto.
748

749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784
	Fixed various harmless memory and file descriptor leaks found by
	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.

Per Cederqvist's avatar
Per Cederqvist committed
785 786
2006-01-02  Per Cederqvist  <ceder@lysator.liu.se>

787 788 789 790 791 792 793 794 795 796
	Update valgrind options to valgrind-2.4.0.
	* src/server/testsuite/lyskomd.supp (i_fopen-2.3.1): New name for
	former i_fopen.
	(i_fopen-2.3.5): New suppression.
	* src/server/testsuite/config/unix.exp (l2g_start): Use valgrind
	option --leak-check=full, not the obsolete variant
	--leak-check=yes.
	(spawn_lyskomd): Ditto.
	(dbck_run): Run with --leak-check=full.

797 798 799 800
	Fixed a type mismatch in adns.
	* src/libraries/adns/src/event.c (adns_processreadable):
	udpaddrlen should be a socklen_t, not int.

Per Cederqvist's avatar
Per Cederqvist committed
801 802 803 804 805 806 807
	Xenofarm warning fixes.
	* src/libraries/adns/src/check.c: Include <stdlib.h>, which is
	needed since abort() is used here.
	* scripts/warnings.sed: gcc 3.4.3 uses 'foo' instead of `foo' to
	mark identifiers.  Adjusted a few warnings that were found by
	various Xenofarm machines.

808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838
2006-01-01  Per Cederqvist  <ceder@lysator.liu.se>

	Since .cvsignore no longer exist, we cannot distribute it.
	* Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* db-crypt/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* db-crypt/db/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* doc/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* doc/man/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* run-support/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* scripts/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* scripts/lyskomd-copyrights: Removed .cvsignore.
	* src/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* src/include/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* src/include/server/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* src/libraries/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* src/libraries/adns/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* src/libraries/adns/client/Makefile.am (EXTRA_DIST): Removed
	.cvsignore.
	* src/libraries/adns/src/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* src/libraries/libansi/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* src/libraries/libcommon/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* src/libraries/libeintr/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* src/libraries/libmisc/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* src/libraries/liboop/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* src/server/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* src/server/testsuite/Makefile.am (EXTRA_DIST): Removed .cvsignore.
	* src/server/testsuite/config/Makefile.am (EXTRA_DIST): Removed
	.cvsignore.
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Removed
	.cvsignore.

Per Cederqvist's avatar
Per Cederqvist committed
839 840
2005-12-28  Per Cederqvist  <ceder@lysator.liu.se>

841 842 843 844 845 846 847 848 849 850 851 852 853 854 855
	Cleanup of simple-cache.c.  (Bug 172).  Allocate less memory when
	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
Per Cederqvist committed
856 857 858 859 860
	Improved test suite logging.
	* 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.

861
2005-12-27  Per Cederqvist  <ceder@lysator.liu.se>
862 863 864 865

	Add a testsuite temporary file to svn:ignore.
	* src/server/testsuite: Add locksuite.lock to svn:ignore.

866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882
	Don't overestimate the number of conferences as next_free_num when
	allocating certain data structures.  (Bug 164).
	* src/server/simple-cache.c (existing_confs): New static
	variable.
	(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
	created.
	(free_all_cache): Decrease existing_confs when conferences are
	deallocated.
	(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.
883 884 885 886 887 888 889 890 891 892 893 894

	Simplified the name parsing routing, and save some small amount of
	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
Per Cederqvist committed
895 896 897 898 899 900 901
2005-12-25  Per Cederqvist  <ceder@lysator.liu.se>

	Minor code cleanup.
	* 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.

902 903 904 905 906 907 908 909
2005-12-24  Per Cederqvist  <ceder@lysator.liu.se>

	Writing to a client that was disconnecting and blocked could cause
	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
Per Cederqvist committed
910 911
2005-12-23  Per Cederqvist  <ceder@lysator.liu.se>

912 913 914 915 916 917 918 919 920
	Add automake-generated files to svn:ignore.
	* scripts: Add depcomp, install-sh, mdate-sh, missing,
	mkinstalldirs and texinfo.tex to svn:ignore.
	* src/libraries/adns: Add depcomp, missing,  and mkinstalldirs to
	svn:ignore.
	* 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
Per Cederqvist committed
921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940
	Add TAGS to svn:ignore.
	* src/include/server: Add TAGS to svn:ignore.
	* src/include: Ditto.
	* src/libraries/adns/client: Ditto.
	* src/libraries/adns/src: Ditto.
	* src/libraries/adns: Ditto.
	* src/libraries/libansi: Ditto.
	* src/libraries/libcommon: Ditto.
	* src/libraries/libeintr: Ditto.
	* src/libraries/libisc-new/src: Ditto.
	* src/libraries/libisc-new: Ditto.
	* src/libraries/libmisc: Ditto.
	* src/libraries/liboop: Ditto.
	* src/libraries/regex: Ditto.
	* src/libraries: Ditto.
	* src/server/testsuite: Ditto.
	* src/server: Ditto.
	* src: Ditto.
	* .: Ditto.

941 942 943 944 945 946 947 948 949 950
2005-12-22  Per Cederqvist  <ceder@lysator.liu.se>

	Don't hang if "Use DNS" is off.  (Bug 1318.)  Thanks to Rasmus
	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.

951 952 953 954 955 956 957 958 959 960 961 962
2005-12-21  Per Cederqvist  <ceder@lysator.liu.se>

	"make check" without a previous "make" failed, because
	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.)

963 964
2005-12-19  Per Cederqvist  <ceder@lysator.liu.se>

Per Cederqvist's avatar
Per Cederqvist committed
965 966 967 968 969 970
	Fixed test suite bitrot.
	* src/server/testsuite/lyskomd.0/11.exp: Handle the message that
	is emitted when the debug calls are disabled.  That message was
	introduced 2004-07-21; apparently, nobody has used the test suite
	without debug calls since then.

971 972
	* Switched from CVS to Subversion.

Per Cederqvist's avatar
Per Cederqvist committed
973 974 975 976 977 978 979 980
2005-12-18  Per Cederqvist  <ceder@lysator.liu.se>

	Update copyright headers.
	* <all files>: update the year in the copyright notice.
	* scripts/lyskomd-copyrights: Ignore m4/* and
	src/server/testsuite/lyskomd.0/*.aux.  Updated year in copyright
	statement.  Ignore src/server/fsusage.[hc].
	
981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006
2005-12-18  Per Cederqvist  <ceder@moria.cederqvist>

	Implemented the disable-client debug call, and use it in a test
	suite.  Some minor code refactoring.
	* src/include/services.h (disable_client): New debug request.
	* src/server/fncdef.txt (disable_client): New debug request.
	* src/server/connections.h (Connection) [DEBUG_CALLS]: New field:
	blocked_by_disable_client.
	* src/server/internal-connections.c (init_connection)
	[DEBUG_CALLS]: Initialize blocked_by_disable_client.
	(new_client): Ditto.
	* src/server/connections.c (parse_unparsed) [DEBUG_CALLS]: Don't
	process any request if the client is disabled by disable_client.
	(may_read_more): New method, extracted from read_from_connection.
	Return false if disabled by disable_client.
	(should_be_disabled): New method, extracted from
	read_from_connection and check_idle_callback. Return true if
	disabled by disable_client.
	(read_from_connection): Simplified code by using may_read_more and
	should_be_disabled.
	(check_idle_callback): Simplified code by using should_be_disabled.
	(disable_client): New debug request.
	* src/server/testsuite/lyskomd.0/51.exp: New test suite. Test that
	nothing is read from a disabled client, and that the output queue
	fills up properly.

1007 1008 1009 1010 1011 1012
2005-12-12  Per Cederqvist  <ceder@ingate.com>

	x-face is a broken and historical image format, so don't promote
	it.
	* doc/Protocol-A.texi (Aux-Item Types): Deprecate x-face.

Per Cederqvist's avatar
Per Cederqvist committed
1013 1014 1015 1016 1017
2005-12-12  Per Cederqvist  <ceder@lysator.liu.se>

	Added on assert.
	* src/server/stats.c (update_one_stat): Added an assert.

1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037
2005-12-11  Per Cederqvist  <ceder@lysator.liu.se>

	The get-members-old request is often better than get-members, so
	remove the "Obsolete" status from it.
	* doc/Protocol-A.texi (Protocol Requests): get-members-old is now
	being promoted from "Obsolete" to "Recommended".
	(get-members-old): Ditto.  Discuss get-members versus
	get-members-old.
	(get-members): Ask client writers to consider using
	get-members-old.

	Clarify how create-conf-old works.
	* doc/Protocol-A.texi (create-conf-old): Document when the ability
	to send an Extended-Conf-Type was introduced, and what it means to
	send a four-bit Conf-Type.

	Doc fixes.
	* doc/Protocol-A.texi (create-text): Typo fixed.
	(Mapping Local to Global Text Numbers): Typo fixed.

Per Cederqvist's avatar
Per Cederqvist committed
1038 1039 1040 1041 1042 1043
2005-12-11  Per Cederqvist  <ceder@moria.cederqvist>

	Doc fixes.
	* doc/Protocol-A.texi (set-membership-type): Typo fixed.
	* HACKING: Update paths to the files on the Lysator web server.  

Per Cederqvist's avatar
Per Cederqvist committed
1044 1045 1046 1047 1048 1049
2005-11-28  Per Cederqvist  <ceder@moria.cederqvist>

	Comment fix.
	* doc/checkargs.py (generate_summary_output): Fixed a typo in the
	generated comment.

Per Cederqvist's avatar
Per Cederqvist committed
1050 1051 1052 1053 1054 1055 1056
2005-05-06  Per Cederqvist  <ceder@lysator.liu.se>

	Doc fix.
	* doc/Protocol-A.texi (get-uconf-stat): Don't state that this is
	the only way to get all the flag bits of the conference.  It
	isn't; get-conf-stat works just fine.

Per Cederqvist's avatar
Per Cederqvist committed
1057 1058 1059 1060 1061 1062
2005-04-04  Per Cederqvist  <ceder@lysator.liu.se>

	Doc fix.
	* doc/Protocol-A.texi (local-to-global-reverse): Fixed typo.
	* doc/constructs.expected: Updated.

1063 1064 1065 1066 1067 1068
2004-12-13  Per Cederqvist  <ceder@ingate.com>

	Added a comment.
	* src/server/person.c (get_person_stat): Added a comment that
	explains why get-person-stat is allowed without logging in.

Per Cederqvist's avatar
Per Cederqvist committed
1069 1070 1071 1072 1073 1074
2004-12-02  Per Cederqvist  <ceder@ingate.com>

	Doc fix.
	* doc/Protocol-A.texi (mark-as-read): Document the error code
	long-array.

1075 1076
2004-11-30  Per Cederqvist  <ceder@ingate.com>

Per Cederqvist's avatar
Per Cederqvist committed
1077 1078 1079 1080
	Release doc fix.
	* HACKING (Release generation): Check third-party packages for new
	versions.

1081 1082 1083 1084
	Allocate a range of aux-item types to Canidius.  (Bug 1440).
	* doc/Protocol-A.texi (Client-Specific Aux-Item Types): Allocate
	10300-10399 to Canidius.

1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099
2004-08-03  Per Cederqvist  <ceder@ceder.dyndns.org>

	Minor cleanup of the multipart-related documentation supplied by
	Rasmus Sten.
	* doc/Protocol-A.texi (Aux-Item Types): Remove inferior
	documentation of multipart handling by allowed-content-type; that
	is now obsoleted by the better documentation that Rasmus Sten
	provided.  Fix markup and language errors in the documentation by
	Rasmus.
	(Multipart (multipart/mixed)): Fixed markup errors.  Clarify that
	text/x-kom-basic is preferred.
	(MHTML (message/rfc822;x-lyskom-variant=rfc2557)): Fixed markup
	errors.  Clarify that it is automatic access to external resources
	that should be stopped.

1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113
2004-08-02  Per Cederqvist  <ceder@ceder.dyndns.org>

	* AUTHORS: Added Rasmus Sten.

2004-08-02  Rasmus Sten  <rasmus@bricole.se> (committed by ceder)

	Document how multipart content should be handled by Protocol A
	clients, and document MHTML and multipart/mixed.
	* doc/Protocol-A.texi (Aux-Item Types): State that
	allowed-content-type should be applied recursively to all content
	types, in much more detail than in the change of 2004-07-18.
	(Multipart (multipart/mixed)): New section.
	(MHTML (message/rfc822;x-lyskom-variant=rfc2557)): New section.

1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161
2004-07-21  Per Cederqvist  <ceder@ingate.com>

	Increase coverage of the aux-item definitions parser.  (Bug 64).
	Get rid of a spurious error message found in the process.  Use
	less preprocessor macro magic.
	* src/server/testsuite/lyskomd.0/bug-64.exp: New file.  Increase
	test coverage of aux-item-def-parse.y.
	* src/server/testsuite/lyskomd.0/bug-64.aux: New file.
	* src/server/testsuite/lyskomd.0/bug-64-2.aux: New file.
	* src/server/simple-cache.c (pre_sync): Use VBUG instead of BUG to
	report sync start and stop.
	* src/server/aux-item-def-parse.y (CHK_ASSIGN): Macro rewritten as
	the new chk_assign() function, with a slightly different API.
	This was mainly done to get rid of the error message "invalid
	field name: xyzzy" that occured if the value of xyzzy was bogus,
	even if xyzzy itself was a valid name.  All callers updated.
	(CHK_FLAG_A): Similarly rewritten as chk_flag_a().
	(assign): Check for valid field name and valid field content
	separately, so that the "invalid field name: xyzzy" message isn't
	printed just because the content is bad.
	(chk_assign): New name for former aux_item_def_check_assign.  New
	arguments: found and good; return status via them.
	(chk_flag_a): New function.
	(aux_item_def_check_trigger): New arguments: found and good;
	return status via them.
	(aux_item_def_check_validate): Ditto.
	
	Test suite framework improvements: simple_expect can now expect
	lines that don't contain the line leader, and lyskomd_start and
	lyskomd_fail_start can now handle output sent before the database
	lock is taken.
	* src/server/testsuite/config/unix.exp (simple_expect): If the
	regexp starts with "<<<", remove it, and don't expect a line
	leader.  This is useful for catching messages from lyskomd that
	are created by libraries that we have no control over, and that
	don't emit the expected line leader.
	(set_debug_calls): New proc, extracted from lyskomd_start and 
	lyskomd_fail_start.  Expect the new message that is emitted when
	the debug calls are disabled.
	(lyskomd_start): New optional argument: pre_lock_messages.  Moved
	code to set_debug_calls().
	(lyskomd_fail_start): Ditto.
	* src/server/ramkomd.c (main): Write a message when debug calls
	are disabled, to help the test suite.

	Fixed a comment.
	* src/server/testsuite/timeval-overflow.c: Fixed a comment.

1162 1163
2004-07-18  Per Cederqvist  <ceder@ingate.com>

1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211
	Implement async-text-read and async-invalidate-text-read.  (Bug
	985).
	* src/server/testsuite/lyskomd.0/52.exp: Test async-text-read and
	async-invalidate-text-read.
	* src/server/testsuite/lyskomd.0/03.exp: Handle async-text-read
	and async-invalidate-text-read.
	* src/server/session.c (accept_async): Handle ay_text_read and
	ay_invalidate_text_read.
	* src/server/send-async.h, src/server/send-async.c
	(async_text_read): New function.
	(async_invalidate_text_read): New function.
	* src/server/prot-a-send-async.h, src/server/prot-a-send-async.c
	(prot_a_async_text_read): New function.
	(prot_a_async_invalidate_text_read): Ditto.
	* src/server/membership.c (mark_as_read): Send async-text-read.
	(mark_as_unread): Send async-invalidate-text-read.
	(set_read_ranges): Ditto.
	(set_unread): Ditto.
	(set_last_read): Ditto.
	* src/server/async.h (enum async): Added ay_text_read and
	ay_invalidate_text_read.
	* doc/Protocol-A.texi (Membership Information): Added the Text-Id
	type.
	(async-text-read): New async message.
	(async-invalidate-text-read): New async message.
	* doc/constructs.expected: Updated.

	Added missing newline in kom_log call.
	* src/server/connections.c: (set_time): Added a missing newline in
	a log message.

	Doc fixes.
	* src/server/testsuite/locksuite.py: Doc fixes. 
	* src/server/connections.c: Doc added.
	* doc/Protocol-A.texi (Person Status Types): Added missing closing
	parenthesis.
	(Who Information): Ditto.
	(modify-system-info): Fixed references to argument names in the
	error code descriptions.
	(Aux-Item Types): Don't use @field for anything but Protocol A
	structure fields.  

	Specify how multipart contents should be handled by the aux-item
	allowed-content-type.
	* doc/Protocol-A.texi (Aux-Item Types): State that
	allowed-content-type should be applied recursively to all content
	types.

1212 1213 1214 1215 1216 1217 1218 1219
	Fix bit decay in the test suite.
	* src/server/testsuite/lyskomd.0/bug-1121.exp: Turn off garbing
	when reading the old bug-1121 database so that the garb doesn't
	remove our test data.
	* src/server/testsuite/lyskomd.0/46.exp: Bison 1.875 uses a
	slightly different error message; update the regexp to accept it
	as well as older versions.

David Byers's avatar
David Byers committed
1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234
2004-06-19  David Byers  <byers@lysator.liu.se>

	Documentation improvements:
	* doc/lyskomd.texi (Aux-Item Definition File): Documented
	supervisor-only and author-only more accurately (bug 530).

	* doc/Protocol-A.texi (Aux-Item Types): Document letterbox, text
	and other type parameters of aux-item definitions (bug 9).
	(Person Status Types, Who Information, Session Information):
	Improved documentation of the username field (bug 196).
	(add-member): Fixed documentation of error codes (bug 199).
	(async-i-am-on): Fixed error in the message description (bug 200).
	(Importing and Exporting E-Mail): Improved documentation on what
	aux-items affect importers (bug 201).

1235 1236 1237 1238 1239 1240
2004-04-26  Per Cederqvist  <ceder@ceder.dyndns.org>

	Added weblatte to the list of registered clients.
	* doc/Protocol-A.texi (set-client-version): Added weblatte to the
	list of registered clients.

Per Cederqvist's avatar
Per Cederqvist committed
1241 1242 1243 1244 1245 1246
2004-04-02  Per Cederqvist  <ceder@ingate.com>

	Gentoo portability.
	* mkmi (WANT_AUTOMAKE): Set it.
	(WANT_AUTOCONF): Set it.

Per Cederqvist's avatar
Per Cederqvist committed
1247 1248 1249 1250 1251
2004-01-06  Per Cederqvist  <ceder@ceder.dyndns.org>

	Fix "make check".
	* doc/constructs.expected: Updated.

1252 1253 1254 1255 1256 1257
2004-01-05  Per Cederqvist  <ceder@ceder.dyndns.org>

	Xenofarm: detect warnings during ckprg.
	* scripts/xenofarm.sh (ckprg): Use the ckprgwarn function, so that
	warnings during ckprg are detected.

1258 1259 1260 1261 1262 1263 1264 1265
2003-12-28  Per Cederqvist  <ceder@ceder.dyndns.org>

	Protocol A whitespace usage was only documented in the direction
	from the client to the server!
	* doc/Protocol-A.texi (Client-Server Dialog): Document how
	elements sent from the server to the client are separated and
	terminated.

1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283
2003-11-28  Per Cederqvist  <ceder@ceder.dyndns.org>

	Protocol A clarifications: %g uses the "C" locale, no-of-texts is
	misnamed, read-ranges is sorted, and the description of what is
	unread was outdated.
	* doc/Protocol-A.texi (Simple Data Types): The %g format specifier
	is locale-dependent in the C specification, so say that FLOAT is
	formatted as %g is formatted in the "C" locale.
	(Conference Status Types): Fixed the description of the
	no-of-texts field.  It is actually the difference between the
	first unused local text number and first-local-no, and that will
	differ from the number of texts in the conference if a text other
	than the oldest one is removed.
	(Membership Information): Document that read-ranges is kept in
	ascending order.
	(What do I have unread): Update the description with the version
	11 requests.

Per Cederqvist's avatar
Per Cederqvist committed
1284 1285 1286 1287 1288 1289
2003-10-06  Per Cederqvist  <ceder@ceder.dyndns.org>

	Port to IRIX make.
	* doc/Makefile.am (check-doc): Don't have blank lines among the
	commands, since make on IRIX chokes on them.

1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301
2003-10-04  Per Cederqvist  <ceder@ceder.dyndns.org>

	The timestamp in a database file shold be the time when the
	snapshot was taken.  It should not be updated when the file is
	changed from DIRTY to CLEAN state.
	* src/server/simple-cache.c (sync_output_header): New argument:
	include_timestamp.
	(pre_sync): The header should include a timestamp.
	(save_one_text): The header should not include a timestamp when
	the "CLEAN" marker is written.  We want the timestamp in the file
	to be the time when the snapshot was taken.

1302 1303
2003-10-03  Per Cederqvist  <ceder@ceder.dyndns.org>

1304 1305 1306
	Ignore harmless warnings from fsusage.c.
	* scripts/warnings.sed: Ignore warnings produced by fsusage.c.
	
Per Cederqvist's avatar
Per Cederqvist committed
1307 1308 1309 1310
	Fixed typo.
	* m4/Makefile.am (EXTRA_DIST): Fixed typo: "intmax_t.m4" ->
	"uintmax_t.m4".

1311 1312 1313
	Port checkkomspace to non-GNU systems.
	* src/server/Makefile.am (checkkomspace_SOURCES): Added $(GETOPT).

Per Cederqvist's avatar
Per Cederqvist committed
1314 1315 1316 1317 1318 1319 1320 1321 1322
	Port fsusage to FreeBSD.
	* m4/Makefile.am (EXTRA_DIST): Added intmax_t.m4, inttype_h.m4 and
	ulonglong.m4.
	* m4/ulonglong.m4: New file, taken verbatim from GNU fileutils-4.1.
	* m4/uintmax_t.m4: New file, taken verbatim from GNU fileutils-4.1.
	* m4/inttypes_h.m4: New file, taken verbatim from GNU fileutils-4.1.
	* configure.in: Added jm_AC_TYPE_UINTMAX_T and remove the too
	simple check for inttypes.h.

1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392
	Added the checkkomspace program.
	* doc/lyskomd.texi (Parameters): Document these:
	    Free space warning level
	    Free space warning percent
	    Free inodes warning level
	    Free inodes warning percent
	    Free space critical level
	    Free space critical percent
	    Free inodes critical level
	    Free inodes critical percent
	(Invoking checkkomspace): New node.
	* src/server/stderrlog.c: New file.
	(kom_log): Moved here from dbck.c
	(restart_kom): Ditto.
	* src/server/server-config.c (parameters): Added these parameters:
	    Free space warning level
	    Free space warning percent
	    Free inodes warning level
	    Free inodes warning percent
	    Free space critical level
	    Free space critical percent
	    Free inodes critical level
	    Free inodes critical percent
	* src/server/param.h (struct kom_par): Added
	chkspc_warn_space_abs, chkspc_warn_space_percent,
	chkspc_warn_inode_abs, chkspc_warn_inode_percent,
	chkspc_crit_space_abs, chkspc_crit_space_percent,
	chkspc_crit_inode_abs and chkspc_crit_inode_percent.
	* src/server/dbck.c (kom_log): Moved to stderrlog.c.
	(restart_kom): Ditto.
	* src/server/checkkomspace.c: New file.
	* src/server/Makefile.am (sbin_PROGRAMS): Added checkkomspace, but
	only if HAVE_FSUSAGE.
	(READ_CONFIG): Removed log.c.
	(komrunning_SOURCES): Added log.c.
	(updateLysKOM_SOURCES): Added log.c.
	(checkkomspace_SOURCES): New variable.
	(dbck_SOURCES): Added strderrlog.c.
	(splitkomdb_SOURCES): Added log.c.
	* src/server/.cvsignore: Added checkkomspace.
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	50.exp.
	* src/server/testsuite/lyskomd.0/50.exp: New file.  Test
	checkkomspace.

	Import fsusage, from GNU fileutils-4.1.
	* AUTHORS: Document the origin of fsusage.
	* Makefile.am (SUBDIRS): Added m4.
	(ACLOCAL_AMFLAGS): Added -I m4.
	* m4/fsusage.m4: New file, taken verbatim from GNU fileutils-4.1.
	* m4/Makefile.am: New file.
	* mkmi: Added "-I m4" to top-level aclocal.
	* src/server/fsusage.h: New file, taken verbatim from GNU
	fileutils-4.1.
	* src/server/fsusage.c: New file, taken verbatim from GNU
	fileutils-4.1.
	* configure.in: Added several tests required by fsusage:
	(AC_C_VOLATILE): Required by fsusage.
	(AC_CHECK_HEADERS): Added inttypes.h, limits.h, sys/mount.h,
	sys/vfs.h, sys/fs/s5param.h, sys/filsys.h, sys/statfs.h,
	sys/statvfs.h, sys/dustat.h, fcntl.h.
	(jm_FILE_SYSTEM_USAGE): Call it.
	(HAVE_FSUSAGE): New automake conditional.
	(AC_CONFIG_FILES): Added m4/Makefile.

	Testsuite: slow machines workaround.
	* src/server/testsuite/lyskomd.0/29.exp (startup): Increase the
	sync interval to 6 hours, so that it doesn't interfere on slow
	machines.

1393 1394 1395 1396 1397 1398 1399 1400 1401 1402
2003-08-31  Per Cederqvist  <ceder@ceder.dyndns.org>

	Fixed errors in the generated grammars found by Peter Zander.
	* doc/checkargs.py (generate_stable_output): Don't forget to
	convert type names for functions and asynchronous messages that
	take a single argument.  Use "%Async name" instead of
	"%Async-Name".
	(generate_summary_output): Use "%Async name" instead of
	"%Async-Name".

Per Cederqvist's avatar
Per Cederqvist committed
1403 1404 1405 1406
2003-08-30  Per Cederqvist  <ceder@ceder.dyndns.org>

	* Release 2.1.2.

1407 1408
2003-08-29  Per Cederqvist  <ceder@ceder.dyndns.org>

Per Cederqvist's avatar
Per Cederqvist committed
1409 1410 1411 1412 1413 1414 1415
	Spelling fixes.
	* doc/Protocol-A.texi: Spelling errors fixed.

	Makefile fix.
	* doc/Makefile.am (DISTCLEANFILES): Added protocol-a-current.txt,
	protocol-a-recommended.txt and protocol-a-full.txt.

1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429
	Release administrativa.
	* configure.in: Set version 2.1.2.
	* versions (SERVER-VERSION): Set to 2.1.2.
	(SERVER-COMPAT-VERSION): Set to 20102.
	* doc/Protocol-A.texi (PROTOEDITION): Set to 11.1.
	(VERSION): Set to 2.1.2.
	(Document Edition History): Added an entry for 11.1.  Added
	missing "Distributed with" line for 11.0.
	(Top): Say that this was "first distributed with" a certain
	lyskomd release, not that it "corresponds to" a release.  This
	way, the text is more accurate if a bug-fix release of lyskomd is
	made without updating the Protocol-A.texi file.
	* NEWS: Updated for the 2.1.2 release.
	* README: Mention that the bug 1121 fix will write stuff to the
Per Cederqvist's avatar
Per Cederqvist committed
1430 1431 1432 1433 1434
	log.  Update the year in the copyright notice.
	* scripts/lyskomd-copyrights: The top-level README file has a
	copyright statement, so don't forget to update that file.  Don't
	update the generated machine-readable grammars.  Don't update the
	data files for bug-1121.exp.
1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445

	Don't allow the garb thread to be starved.  Tune the garb
	parameters.  (Bug 1129).
	* src/server/text-garb.c (garb_callback): Always run the garb, so
	that it cannot be completely starved.
	* src/server/server-config.c (parameters): Changed "Garb busy
	postponement" from 20 to 50 milliseconds.  Changed "Garb timeout"
	from 100 to 0 milliseconds.
	* src/include/kom-types.h (Text_stat): Remove swedish in a comment.
	* doc/lyskomd.texi (Parameters): Updated "Garb busy postponement"
	and "Garb timeout".
1446 1447
	* src/server/testsuite/lyskomd.0/37.exp: Updated the expected
	timeouts for the garb tuning.
1448 1449 1450 1451
	
	Document the garb.  (Bug 194).
	* doc/Protocol-A.texi (Garb): New chapter.
	
1452 1453 1454 1455 1456
	Check for a potential memory leak when killing a client.
	(Bug 149).
	* src/server/internal-connections.c (kill_client): Check that no
	aux_item_list remains.

1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476
	Don't produce overlapping ranges in the read-ranges part of a
	membership.  (Bug 1121).  Make lyskomd fix the errors introduced
	by bug 1121.
	* src/server/membership.c (insert_loc_no): Handle the case where
	adjoining ranges exists properly instead of producing overlapping
	ranges.
	* src/server/ram-parse.c (fparse_read_range_0): Handle the errors
	introduced by bug 1121.  Log an error message if any damage was
	repaired.
	* src/server/testsuite/config/unix.exp (lyskomd_start): New
	argument: db_messages.
	(dbck_run): New argument: extra_lines.
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	bug-1121.exp, bug-1121.data and bug-1121.texts.
	* src/server/testsuite/lyskomd.0/bug-1121.exp: Test for bug 1121:
	mark-as-read mishandles read texts in some circumstances.  Also
	test that lyskomd can repair the problems introduced by this bug.
	* src/server/testsuite/lyskomd.0/bug-1121.texts: New file.
	* src/server/testsuite/lyskomd.0/bug-1121.data: New file.

1477 1478
2003-08-28  Per Cederqvist  <ceder@ceder.dyndns.org>

Per Cederqvist's avatar
Per Cederqvist committed
1479 1480 1481 1482
	Reduce the noise in the log.
	* src/server/connections.c (read_from_connection): Don't report
	ETIMEDOUT errors, as they seem to be quite common.

1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506
	Generate two now forms of extracted grammars.  Publish them on the
	web.  Mention them in Protocol-A.texi.
	* doc/Protocol-A.texi (Extracted grammar): New appendix that
	discusses the extracted files.
	* doc/Makefile.am (update-www): Depend on protocol-a-full.txt, so
	that checkargs.py is run first.  Copy the generated grammars to
	the web dir.
	(protocol-a-full.txt): New target.
	* doc/checkargs.py: Generate protocol-a-recommended.txt and
	protocol-a-current.txt.
	(prot_a_type.__init__): Initialize __recommended to 0.
	(prot_a_type.use): New argument: recommended.  All callers
	updated.  Set the __recommended flag once a recommended request or
	async uses this type.
	(prot_a_builtin.use_recurse): Ditto.
	(prot_a_type.recommended): New method.
	(lexer.__parse_type): Replaced the protover arguemnt with a
	request object.  All callers updated.
	(lexer.__parse_request_arg): Ditto.
	(generate_stable_output): New argument: filename,
	only_recommended.
	(generate_summary_output): New function.
	* doc/constructs.expected: Updated.

1507 1508 1509 1510 1511 1512 1513 1514
2003-08-28  Kent Engström  <kent@lysator.liu.se>

        Add support for the "html" alternative of mx-refuse-import.
	* run-support/aux-items.conf: Update validation regexp. Also
	set the unique flag to false.
	* doc/Protocol-A.texi (Aux-Item Types): Document "html".
	* doc/constructs.expected: Add @code{html}.

1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589
2003-08-28  Per Cederqvist  <ceder@ceder.dyndns.org>

	Don't crash if a person has read more than 65535 texts after the
	first unread.
	* src/server/ram-parse.c (fparse_read_range_0): Use int, not
	short, in case a person has read many texts after the first unread
	text.

	Complete the renaming of aux.h.
	* scripts/lyskomd-copyrights: src/server/aux.h has been renamed to
	src/server/aux-no.h.

	Fix several minor errors in Protocol-A.texi.
	* doc/Protocol-A.texi (Protocol Requests): The status codes for
	who-is-on-ident and get-session-info-ident were "r" but should
	have been "O".
	(login-old): Added info about when this request became obsolete in
	the section.
	(get-person-stat-old): Ditto.
	(lookup-name): Ditto.
	(get-conf-stat-older): Ditto.
	(mark-text-old): Ditto.
	(who-is-on-old): Ditto.
	(broadcast): Ditto.
	(get-session-info): Ditto.
	(re-lookup-person): Ditto.
	(re-lookup-conf): Ditto.
	(lookup-person): Ditto.
	(lookup-conf): Ditto.
	(query-read-texts-10): Ditto.
	(get-membership-10): Ditto.
	(set-connection-time-format): Fixed typo in the @section heading.
	(Asynchronous Messages): The status codes for async-new-text-old
	was "r" but should have been "O".
	(async-new-text-old): Added async number to the @section heading.
	(async-i-am-off): Ditto.
	(async-i-am-on-obsolete): Ditto.
	(async-new-name): Ditto.
	(async-i-am-on): Ditto.
	(async-sync-db): Ditto.
	(async-leave-conf): Ditto.
	(async-login): Ditto.
	(async-broadcast): Ditto.
	(async-rejected-connection): Ditto.
	(async-send-message): Ditto.
	(async-logout): Ditto.
	(async-deleted-text): Ditto.
	(async-new-text): Ditto.
	(async-new-recipient): Ditto.
	(async-sub-recipient): Ditto.
	(async-new-membership): Ditto.
	(async-new-user-area): Ditto.
	(async-new-presentation): Ditto.
	(async-new-motd): Ditto.
	(async-text-aux-changed): Ditto.

	Generate a stable machine-readable file with the syntax of
	Protocol A. 
	* doc/checkargs.py (defined_request_names): New variable.
	(defined_request_names): New variable.
	(defined_async_names): New variable.
	(set_values): New variable.
	(tt): New variable.
	(tr): New variable.
	(rt): New variable.
	(rr): New variable.
	(at): New variable.
	(ar): New variable.
	(has_suffix): New function.
	(remove_suffix): New function.
	(prot_a_type.__init__): Initialize __protover.
	(prot_a_type.line_no): Renamed from line().
	(prot_a_type.use): New argument: protover.  All callers
	and derived methods updated.
	(prot_a_builtin.use_recurse): Ditto.
1590
	(prot_a_type.protover): New method.
1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631
	(prot_a_simple.base_type): New method.
	(prot_a_simple.array): New method.
	(prot_a_alternate.type_a): New method.
	(prot_a_alternate.type_b): New method.
	(prot_a_struct.fields): New method.
	(prot_a_bitstring.add_field): Store the bits in the order they are
	defined.
	(prot_a_bitstring.bits): New method.
	(prot_a_selection.fields): New method.
	(prot_a_enumeration_of.base_type): New method.
	(prot_a_msg): New class.
	(prot_a_request): New class.
	(prot_a_async): New class.
	(menu): New class.
	(reader.menu_re): New constant.
	(reader.getc_eofok): If a menu line for a request or async message
	is found, store the information.
	(reader.menu): New method.
	(lexer.section_re): New method.
	(lexer.__init__): __implemented_conftypes and
	__implemented_privbits both maps to None, not a random number.
	(lexer.run): If __toplevel_at() returns a non-None value, return
	it.
	(lexer.__toplevel_at): Return the result of the called "toplevel_"
	method instead of always returning None.
	(lexer.toplevel_set): New method.
	(lexer.toplevel_section): New method.
	(lexer.toplevel_findex): Store information about the request in a
	prot_a_request instance.  Check the corresponding @section heading
	and @menu item.
	(lexer.toplevel_amindex): Ditto for asyncs.
	(lexer.__parse_async): New API.
	(lexer.toplevel_bye): Generate stable names.  Return the error
	flag instead of calling sys.exit().
	(lexer.__parse_request): New API.
	(lexer.__parse_type): New argument: protover.
	(lexer.__parse_request_arg): Ditto.  Return the parsed info.
	(lexer.__bad_arg): Fixed minor typo.
	(lexer.generate_stable_names): New method.
	(generate_stable_output): New function.

1632 1633 1634 1635
2003-08-26  Per Cederqvist  <ceder@ceder.dyndns.org>

	* Release 2.1.1.

1636 1637
2003-08-25  Per Cederqvist  <ceder@ceder.dyndns.org>

1638 1639 1640 1641 1642 1643 1644 1645 1646
	Release administrativa.
	* versions (SERVER-VERSION): Set to 2.1.1.
	(SERVER-COMPAT-VERSION): Set to 20101.
	* configure.in: Set version 2.1.1.
	* NEWS: Updated for the 2.1.1 release.

	Fix the installation instructions.
	* README: Tell the admin to run "komrunning start" if upgrading.

1647 1648 1649 1650
	Create var/lyskomd/exportdb during install.  (Bug 1119).
	* run-support/Makefile.am (install-data-local): Create
	var/lyskomd/exportdb.

1651 1652 1653 1654 1655 1656 1657 1658
	Rename aux.h to aux-no.h.  (Bug 1116).
	* src/server/Makefile.am (aux-no.h): New name for former "aux.h".
	The name "aux.h" isn't legal on the operating systems Cygwin runs
	on top of.  All references to aux.h in this file updated.
	* src/server/.cvsignore: aux.h has been renamed aux-no.h.
	* src/server/aux-items.c: Ditto.
	* src/server/text.c: Ditto.

1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680
	Added some missing auxiliary files to the distribution.
	* src/libraries/adns/Makefile.am (EXTRA_DIST): Added changelog.
	* src/libraries/adns/client/Makefile.am (EXTRA_DIST): Added
	.cvsignore.
	* src/libraries/adns/src/Makefile.am: Ditto.
	* src/libraries/liboop/Makefile.am: Ditto.

	Added test cases for write errors.
	* src/server/testsuite/lyskomd.0/49.exp: New file, that tests
	client disconnect immediately before a write().
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	49.exp.
	* src/include/services.h (server_sleep): New debug request.
	* src/server/fncdef.txt: Added the debug call server_sleep.
	* src/server/debug.c (server_sleep): New request.

	Testsuite cleanup.
	* src/server/testsuite/lyskomd.0/bug-52.exp: Fixed typo in
	never-executed code.
	* src/server/testsuite/lyskomd.0/47.exp: Fixed a typo in a
	comment.

1681 1682 1683 1684
2003-08-24  Per Cederqvist  <ceder@ceder.dyndns.org>

	* Release 2.1.0.

1685 1686 1687 1688 1689 1690 1691
2003-08-23  Per Cederqvist  <ceder@lysator.liu.se>

	Fixes for the web publication of Protocol A.
	* doc/Makefile.am (protocol-a.info): Updated the rule to what
	automake-1.7.6 would have generated.  Don't generate the info file
	in $(srcdir).

1692 1693
2003-08-23  Per Cederqvist  <ceder@ceder.dyndns.org>

Per Cederqvist's avatar
Per Cederqvist committed
1694 1695 1696 1697 1698 1699
	Set the release date.
	* HACKING: Mention that the release date should be set.
	* NEWS: Set the release date to tomorrow.
	* doc/Protocol-A.texi (Document Edition History): Set the release
	date to tomorrow.

1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727
	Update copyright headers.
	* <all files>: update the year in the copyright notice.
	* scripts/lyskomd-copyrights: Ignore public domain files:
	    doc/kom-style.el 
	    scripts/warnings.sed
	Ignore tiny files:
	    scripts/definepath
	    scripts/unprefix
	    src/server/timewrap.h
	Ignore generated files:
	    src/server/paths.h
	    doc/version.texi 
	Ignore user-supplied files:
	    src/server/testsuite/config/localcfg.exp
	Ignore binaries:
	    src/server/testsuite/get-time-often
	    src/server/testsuite/test-sigjmp
	    src/server/testsuite/timeval-overflow
	Ignore temporary files:
	    src/server/testsuite/lyskomd.0/aux-items-35.conf
	    src/server/testsuite/lyskomd.0/aux-items-46.conf
	    src/server/testsuite/lyskomd.0/aux-items-bad.conf
	Ignore run-support/savecore-lyskom, not 	
	run-support/savecore.
	
	Don't claim copyright on a collection of compiler error messages.
	* scripts/warnings.sed: Placed in the public domain.

1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742
	Make all requests that takes a BOOL argument return bad-bool if
	something besides 0 or 1 is sent by the client.
	* doc/Protocol-A.texi (get-membership-old): Added error code
	bad-bool.
	(login): Ditto.
	(re-z-lookup): Ditto.
	(lookup-z-name): Ditto.
	(who-is-on-dynamic): Ditto.
	(get-membership-10): Ditto.
	(query-read-texts): Ditto.
	(get-membership): Ditto.
	(set-connection-time-format): Ditto.
	(Error Codes): Document error code bad-bool.
	(Protocol Version History): Mention bad-bool.
	(Document Edition History): Mention bad-bool.
Per Cederqvist's avatar
Per Cederqvist committed
1743
	* NEWS: Added info about bad-bool.
1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760
	* src/include/kom-errno.h (enum kom_err): Added KOM_BAD_BOOL.
	* src/server/manipulate.h (CHK_BOOL): New macro.
	* src/server/session.c (login): Call CHK_BOOL for invisible.
	(who_is_on_dynamic): Call CHK_BOOL for want_visible and
	want_invisible.
	(set_connection_time_format): Call CHK_BOOL for use_utc.  Don't
	use KOM_INDEX_OUT_OF_RANGE for that error.
	* src/server/regex-match.c (re_z_lookup): Call CHK_BOOL for
	want_persons and want_confs.
	* src/server/person.c (query_read_texts): Call CHK_BOOL for
	want_read_ranges.
	* src/server/membership.c (get_membership_old): Call CHK_BOOL for
	want_read_texts.
	(get_membership_10): Ditto.
	(get_membership): Call CHK_BOOL for want_read_ranges.
	* src/server/conference.c (lookup_z_name): Call CHK_BOOL for
	want_persons and want_confs.
Per Cederqvist's avatar
Per Cederqvist committed
1761 1762 1763
	* src/server/testsuite/lyskomd.0/01.exp: Expect bad-bool, not
	index-out-of-range, from set-connection-time-format(2).
	* src/server/testsuite/lyskomd.0/03.exp: Ditto.
1764 1765
	* src/server/testsuite/lyskomd.0/48.exp: New file: Test the
	bad-bool error code.
1766 1767
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	48.exp.
1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781

	Make statement-like macros more robust.
	* src/server/manipulate.h (CHK_CONNECTION): Use the "do ... while
	(0)" construct to make this macro expand to exactly one statement.
	(CHK_LOGIN): Ditto.
	(CONF_ZERO): Ditto.
	(CHK_EXIST): Ditto.
	(GET_P_STAT): Ditto.
	(VOID_GET_P_STAT): Ditto.
	(GET_C_STAT): Ditto.
	(VOID_GET_C_STAT): Ditto.
	(GET_T_STAT): Ditto.
	(VOID_GET_T_STAT): Ditto.

1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811
	"make distcheck" lint.
	* src/server/testsuite/lyskomd.0/Makefile.am (MOSTLYCLEANFILES):
	Added aux-items-35.conf and aux-items-46.conf.
	* doc/Makefile.am (MOSTLYCLEANFILES): Added Protocol-A.dvi.
	* src/server/testsuite/lyskomd.0/35.exp: Store the temporary
	aux-item file in lyskomd.0/aux-items-35.conf, instead of
	35-aux.conf, just like other test files already do.
	* src/server/testsuite/.cvsignore: Don't ignore 35-aux.conf.
	* src/server/testsuite/lyskomd.0/.cvsignore: Ignore aux-items-35.conf.
	* src/server/testsuite/lyskomd.0/46.exp: Remove the temporary file
	before copying files to it, to avoid permission problems if the
	files in the source tree has read-only permissions.

	Updated the copyright-updating scripts.
	* scripts/update-copyright: Updated copyright heading.
	* scripts/lyskomd-copyrights: Updated copyright heading.  Don't
	update copyright headers of adns or liboop.

	Update version numbers.
	* HACKING: Updated where version numbers are found.
	* configure.in: Set version 2.1.0.
	* versions (PROTOCOL-A-LEVEL): 11.
	(SERVER-VERSION): 2.1.0.
	(SERVER-COMPAT-VERSION): 20100.
	* doc/Protocol-A.texi (PROTOEDITION): Set to 11.0.
	(PROTOVER): Set to 11.
	(VERSION): Set to 2.1.0.
	(Client-Server Dialog): Talk about "version 10 or newer", not
	only "version 10".

1812
	Release administrativa.
Per Cederqvist's avatar
Per Cederqvist committed
1813
	* NEWS: Updated for the 2.1.0 release.
1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830
	* HACKING: Mention that our automake patch is obsolete.
	* README: Some minor errors fixed.  Ask the reader to vote for the
	bugs he considers important.

	Update the protocol and document history of Protocol A.
	* doc/Protocol-A.texi (Future changes): Don't mention bugs that
	are closed.  Mention that the list of included bugs is
	incomplete.
	(Protocol Version History): Document version 11.
	(Document Edition History): Document edition 11.0.
	* doc/constructs.expected: Updated.

	Revert the Xenofarm automount workaround.
	* src/server/connections.c (dump_connections): Revert the
	automount workaround attempt.  It didn't work, and it also
	introduced an endless loop.

1831 1832
2003-08-22  Per Cederqvist  <ceder@ceder.dyndns.org>

1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860
	Keep track of clients that are beind killed, and don't re-add them
	to the kill list.  (Bug 1100).
	* src/server/internal-connections.h (get_conn_by_number): Document
	that it returns NULL if the session doesn't exist.
	* src/server/internal-connections.c (init_connection): Set the new
	kill_status field of Connection instead of the old kill_pending
	field.
	(new_client): Ditto.
	(check_conn_exists): Dead code removed.
	(get_conn_by_number): Don't crash if no connections exist.  It
	isn't abnormal if the supplied connection number doesn't exist, so
	remove code inside NDEFENSIVE_CHECKS that assumed it was.
	Whitespace fixes.
	* src/server/connections.h (enum kill_state): New enum.
	(Connection): Replaced the "Bool kill_pending" field with a "enum
	kill_stat kill_status" field.
	* src/server/connections.c (check_kill_flg): Use the new
	kill_status field of Connection instead of the old kill_pending
	field.
	(read_from_connection): Ditto.
	(add_to_kill_list): Ditto.  Don't add the client if it is dying.
	
	Update var/lyskomd.clients when the handshake completes by a DNS
	response.
	* src/server/connections.c (dns_resolution): If the DNS resolution
	completed the handshake, dump out the connections again to reflect
	that fact.

Per Cederqvist's avatar
Per Cederqvist committed
1861 1862 1863 1864 1865 1866
	Test for bug 1100.
	* src/server/testsuite/lyskomd.0/47.exp: New file: Test client
	disconnect while logged in and receiving async-logout.
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	47.exp.

1867 1868 1869 1870 1871 1872
	Xenofarm automount workaround.
	* src/server/connections.c (dump_connections): If the rename of
	the file fails with ENOENT, retry it a few times before giving
	up.  This is an attempt to work around an automount problem on the
	Xenofarm at Lysator.

1873 1874 1875 1876 1877 1878 1879 1880
	Fixed an error in the new function l2gi_prev().
	* src/server/local-to-global.c (l2gi_prev): Don't read memory
	before the start of an array.

	Make dump_connections() static.
	* src/server/internal-connections.h (dump_connections): Removed.
	* src/server/connections.c (dump_connections): Now static.

1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931
	New requests: local-to-global-reverse and
	map-created-texts-reverse.  (Bug 1092).
	* doc/Protocol-A.texi (Mapping Local to Global Text Numbers):
	Renamed the field "later-texts-exists" in "Text-Mapping" to
	"more-texts-exists", so that it is useful for the new requests
	defined below.  Updated the descriptions of some fields for the
	same purpose.
	(local-to-global): Added a link to local-to-global-reverse.
	(map-created-texts): Added a link to map-created-texts-reverse.
	(set-connection-time-format): Added a missing protocol number.
	(local-to-global-reverse): New request.
	(map-created-texts-reverse): New request.
	* src/server/fncdef.txt: Added local_to_global_reverse and
	map_created_texts_reverse.
	* src/include/services.h (map_created_texts_reverse): New
	request.
	(local_to_global_reverse): New request.
	* src/server/text.c (local_to_global_reverse): New function.
	* src/server/person.c (map_created_texts_reverse): New request.
	* src/include/kom-types.h (Text_mapping_reverse): New struct.
	* src/server/prot-a.c (prot_a_reply): Handle
	rt_text_mapping_reverse.
	* src/server/prot-a-output.h, src/server/prot-a-output.c
	(prot_a_output_text_mapping_reverse): New function.
	* src/server/connections.h (enum res_type): Added
	rt_text_mapping_reverse.
	(union result_holder): Added text_mapping_reverse.
	* src/server/testsuite/renumber.el
	(renumber-lyskom-send-simple-expect-indented): New function.
	* src/server/testsuite/lyskomd.0/00.exp: Added test cases for
	local-to-global-reverse and map-created-texts-reverse.
	* src/server/testsuite/lyskomd.0/01.exp: Ditto.
	* src/server/testsuite/lyskomd.0/03.exp: Ditto.

	Added support for reverse local-to-global iterators.
	* src/include/kom-types.h (L2g_reverse_iterator): New struct.
	* src/server/local-to-global.h (l2gi_searchsome_reverse): New
	function.
	(l2gi_prev): New function.
	* src/server/Makefile.am (check-l2g): New target.
	* src/server/local-to-global.c (find_block_index_key_reverse): New
	static function.
	(l2gi_searchsome_reverse): New function.
	(l2gi_prev): New function.
	* src/server/testsuite/test-l2g.c (main): Handle command "b", for
	testing backwards iterators.  ("r", "R", and "I" were all taken).
	* src/server/testsuite/l2g.0/07.exp: Added test cases for reverse
	iterators.
	* src/server/testsuite/l2g.0/10.exp: Ditto.
	* src/server/testsuite/l2g.0/11.exp: Ditto.

1932 1933
2003-08-20  Per Cederqvist  <ceder@ceder.dyndns.org>

Per Cederqvist's avatar
Per Cederqvist committed
1934 1935 1936 1937 1938 1939 1940 1941
	Code cleanup.  (Bug 1097).
	* src/server/aux-items.c (find_linked_aux_item_list): Removed all
	traces of PERS_OBJECT_TYPE.
	(mark_linked_object_as_changed): Ditto.
	* src/include/kom-types.h (enum object_type): Removed all traces
	of PERS_OBJECT_TYPE.  Don't explicitly specify the values of the
	constants, since they don't matter.

1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953
	Fix output of linefeed in Protocol A examples.  (Bug 376).
	* doc/Protocol-A.texi (Connecting to the Server): Say "linefeed",
	not "newline" or "line feed".
	(create-text): Ditto.
	(Reformattable Text (text/x-kom-basic)): Ditto.
	(The User Area): Ditto.
	(Text formatting): Ditto.
	(Protocol Version History): Ditto.
	(get-text): Use "@bullet{}" to represent linefeed characters
	inside hollerith strings.
	(create-text-old): Ditto.
	(create-anonymous-text-old): Ditto.
Per Cederqvist's avatar
Per Cederqvist committed
1954
	* doc/constructs.expected: Updated.
1955

1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986
	Return the error code long-array instead of a protocol error if
	a too long array is sent to mark-as-read.  (Bug 836).  Get rid of
	c_local_text_no_p -- use Number_list instead.
	* src/server/fncdef.txt (mark_as_read): Changed the argument from
	"num num c_local_text_no_p" to the more modern "num num_list".
	* src/include/services.h (mark_as_read): Changed the arguments
	"int no_of_text; const Local_text_no *text_arr" into a single more
	modern-style Number_list argument.
	* src/server/membership.c (mark_as_read): Changed the arguments
	"int no_of_text; const Local_text_no *text_arr" into a single more
	modern-style Number_list argument.  Return KOM_LONG_ARRAY if the
	array is too long.  Simplified the code.  
	(set_read_ranges): Call CHK_CONNECTION before checking the
	supplied read_ranges.
	* src/server/prot-a.c (prot_a_init): Removed
	handling of c_local_text_no_p.
	(prot_a_destruct): Ditto.
	* src/server/prot-a-parse-arg-c.awk: Removed
	handling of c_local_text_no_p.
	* src/server/internal-connections.c (init_connection): Removed
	handling of c_local_text_no_p.
	(kill_client): Ditto.  But do check for left-over data in
	num_list.
	* src/server/connections.h (Connection): Removed
	c_local_text_no_p.
	* src/server/connections.c (free_parsed): Removed handling of
	c_local_text_no_p.
	* src/server/call-switch.awk: Removed handling of
	c_local_text_no_p.
	* src/server/testsuite/lyskomd.0/29.exp: Don't expect bug 836.

1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000
	Send mail using sendmail, to avoid malformed mails.  (Bug 185).
	Make the path to sendmail configurable.  Make it possible to turn
	off mail delivery completely.
	* configure.in: Search for a sendmail binary.
	* doc/lyskomd.texi (Parameters): Document "sendmail path".
	* src/server/param.h (struct kom_par): Added sendmail_path.
	* src/server/server-config.c (parameters): Added "sendmail path".
	(read_configuration): Handle it.
	* src/server/updateLysKOM.c (checkstatus): Send mail by opening a
	pipe to "sendmail -t".  That is more portable than pipeing a
	message into "mail".  Turn off mail delivery completely if
	"sendmail path" is set to ":".
	* src/server/Makefile.am (paths.h): Write SENDMAIL_PATH.

2001 2002 2003 2004
	Test suite: Don't forget to distribute aux-items-bad.conf.
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	aux-items-bad.conf.

2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025
	Fix text_read_access() so that it uses the privileges of the
	supplied connection, and never uses active_connection. (Bug 178).
	Fixing this also required me to remove the ability to specify an
	faq-text for a freshly created person on a session where nobody is
	logged on; this could be considered a security fix.
	* src/server/text.c (person_text_read_access): Removed.  Integrate
	the functionality inteo text_read_access.
	(text_read_access): Use the supplied Connection for all checks.
	Don't use active_connection, ENA, ACTPERS or ACT_P.  Fail and log
	an error message if the Connection is NULL.  Use is_supervisor()
	instead of is_supervisor_2().
	* src/server/manipulate.h (is_supervisor_2): Removed.
	(person_text_read_access): Removed.
	* src/server/conference.c (is_supervisor_2): Removed.
	* src/server/aux-items.c (aux_item_validate_existing_text): Don't
	allow access to texts if you are not logged in.  This change means
	that create-person cannot accept aux-items with the
	existing-readable-text validator if nobody is logged in.  I think
	this is more reasonable than the number of special cases in the
	code that were needed to support the old functionality.
	* src/server/testsuite/lyskomd.0/40.exp: Don't expect bug 178.
2026
	* src/server/testsuite/lyskomd.0/41.exp: Don't expect bug 178.
2027 2028 2029 2030 2031
	* src/server/testsuite/lyskomd.0/03.exp: Don't expect to be able
	to create a person with an faq-text.  Add the faq-text using a
	modify-conf-info request instead.  Test that creation of a new
	person with a faq-text item really fails.

2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152
	Keep track of the connection that is creating an aux-item, so that
	ENA_C() and text_read_access() can be used.  Get rid of broken
	concept "owner", and introduced "subordinate" instead.  (Bug 334).
	Some other aux-item-related code cleanup.
	* src/server/aux-items.h (Aux_item_validation_data): Removed
	item_creator, object_creator and owner_check.  Added
	creating_conn and subordinate.  Placed add_to_list,
	start_looking_at and object_type inside #if 0..#endif, since they
	are not currently used.
	(aux_inherit_items):Removed arguments target_creator, creating
	and object_type.  Added argument subordinate.  Changed type of
	arguments object_no and object, since we know that they are a
	Text_no and Text_stat, respectively.
	(check_delete_aux_item_list): Renamed the "owner" argument
	"subordinate".
	(text_stat_check_add_aux_item): Removed the item_creator and
	creating arguments.  Added the creating_conn argument.
	(conf_stat_check_add_aux_item_list): Ditto.
	(system_check_add_aux_item_list): Ditto.
	(conf_stat_check_add_aux_item): Declaration for undefined and
	unused function removed.
	(conf_stat_add_aux_item): Ditto.
	* src/server/aux-items.c (aux_item_validate): Return Success, not
	Bool.  All callers updated.
	(aux_item_add_perm): Removed the arguments item_creator,
	object_creator and owner_check.  Added the arguments creating_conn
	and subordinate.  All callers updated.  Simplified the code.  Use
	is_supervisor() instead of is_strictly_supervisor() where
	appropriate.  Use the supplied connection instead of checking that
	ACTPERS is the item_creator.  Adjusted for the new contents of
	Aux_item_validation_data.
	(aux_inherit_items): Removed arguments target_creator, creating
	and object_type.  Added argument subordinate.  Changed type of
	arguments object_no and object, since we know that they are a
	Text_no and Text_stat, respectively.
	(filter_aux_item_list): Assert that the viewer_conn argument is
	non-NULL.
	(check_delete_aux_item_list): Renamed the "owner" argument
	"subordinate".
	(text_stat_check_add_aux_item_list): Removed the item_creator and
	creating arguments.  Added the creating_conn argument, and assert
	it is non-NULL.
	(conf_stat_check_add_aux_item_list): Replaced the "creator"
	argument with "creating_conn".  Argument assertions added.
	(system_check_add_aux_item_list): Ditto.
	(aux_item_validate_existing_text): Changed return type from Bool
	to Success.  Use person_text_read_access() only when necessary,
	and add a comment explaining why it might happen.
	* src/server/text.c (create_text_add_aux): Adjusted to new API of
	aux_inherit_items().
	(do_create_text): Adjusted to new API of
	text_stat_check_add_aux_item_list().
	(modify_text_info): Ditto.
	* src/server/person.c (create_person_generic): Adjusted to new API
	of conf_stat_check_add_aux_item_list().
	* src/server/manipulate.h (text_read_access): Docstring updated.
	(person_text_read_access): Docstring added.
	* src/server/conference.c (do_create_conf): New argument:
	creating_connection.  All callers updated.
	(modify_conf_info): Adjusted to new API of
	check_delete_aux_item_list() and
	conf_stat_check_add_aux_item_list().
	* src/server/admin.c (modify_system_info): Adjusted to new API of
	system_check_add_aux_item_list().
	* src/server/testsuite/lyskomd.0/24.exp: Use good_bad_expect
	instead of a "if {0}" construct.  Don't expect it to fail.  Fixed
	a broken test outcome.

	Added code to diagnose Success vs. Bool mixups.
	* HACKING (Release generation): Use TYPE_CHECK_COMPILATION for
	increased quality assurance.
	* src/include/misc-types.h (TYPE_CHECK_COMPILATION): New
	compilation switch.
	(SUCCESS_AS_PTR): Ditto.
	(Bool): Provide a pointer-based non-working implementation, that
	can be used for compile-time checks, but not for running code.
	(Success): Provide a pointer-based implementation.  Switch to
	using it, at least for now; this might give us good warnings from
	the compilers.
	* src/server/misc-types.c: New file.  Implementation of the types
	in misc-type.h.
	* src/server/Makefile.am (libcheck_a_SOURCES): Added
	misc-types.c.
	(lyskomd_SOURCES): Ditto.
	(komrunning_SOURCES): Ditto.
	(updateLysKOM_SOURCES): Ditto.
	(dbck_SOURCES): Ditto.
	(splitkomdb_SOURCES): Ditto.
	* src/server/testsuite/Makefile.am (test_l2g_LDADD): libcheck.a
	must be linked twice.
	(get_time_often_LDADD): Ditto.

	Make etags find our documentation.
	* Makefile.am (AM_ETAGSFLAGS): Use --declarations, so that the
	tags command finds the documentation.

	Include an Emacs indentation style for our code.
	* doc/kom-style.el ("KOM"): New C style for c-add-style.  This
	sets up proper indentation for Emacs.
	* doc/Makefile.am (EXTRA_DIST): Added kom-style.el.

	Added more hacking documentation.
	* doc/lyskomd.texi (The Database): Mention that untranslated
	Swedish text exists.
	(local-to-global): Ditto.
	(Modifying Stored Types): Mention that dbck needs to be updated.
	(Coding conventions): New section.

	Document that send async-deleted-text, async-new-text,
	async-new-text-old, async-new-recipient and async-sub-recipient
	are sent to recipients of text linked to the relevant text.
	The functionality was added 2003-01-13.  (Bug 59).
	* doc/Protocol-A.texi (Aux-Item Inheritance): Added a missing
	parenthesis.
	(async-new-text-old): Document that recipients of linked texts
	also gets this message.
	(async-deleted-text): Ditto.
	(async-new-text): Ditto.
	(async-new-recipient): Ditto.
	(async-sub-recipient): Ditto.

2153 2154
2003-08-19  Per Cederqvist  <ceder@ceder.dyndns.org>

2155 2156 2157 2158
	Test permissons for setting the canonical-name aux-item.