ChangeLog 521 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
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.)

13
14
2005-12-19  Per Cederqvist  <ceder@lysator.liu.se>

Per Cederqvist's avatar
Per Cederqvist committed
15
16
17
18
19
20
	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.

21
22
	* Switched from CVS to Subversion.

Per Cederqvist's avatar
Per Cederqvist committed
23
24
25
26
27
28
29
30
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].
	
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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.

57
58
59
60
61
62
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
63
64
65
66
67
2005-12-12  Per Cederqvist  <ceder@lysator.liu.se>

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

68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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
88
89
90
91
92
93
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
94
95
96
97
98
99
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
100
101
102
103
104
105
106
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
107
108
109
110
111
112
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.

113
114
115
116
117
118
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
119
120
121
122
123
124
2004-12-02  Per Cederqvist  <ceder@ingate.com>

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

125
126
2004-11-30  Per Cederqvist  <ceder@ingate.com>

Per Cederqvist's avatar
Per Cederqvist committed
127
128
129
130
	Release doc fix.
	* HACKING (Release generation): Check third-party packages for new
	versions.

131
132
133
134
	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.

135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
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.

150
151
152
153
154
155
156
157
158
159
160
161
162
163
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.

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
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.

212
213
2004-07-18  Per Cederqvist  <ceder@ingate.com>

214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
	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.

262
263
264
265
266
267
268
269
	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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
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).

285
286
287
288
289
290
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
291
292
293
294
295
296
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
297
298
299
300
301
2004-01-06  Per Cederqvist  <ceder@ceder.dyndns.org>

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

302
303
304
305
306
307
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.

308
309
310
311
312
313
314
315
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.

316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
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
334
335
336
337
338
339
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.

340
341
342
343
344
345
346
347
348
349
350
351
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.

352
353
2003-10-03  Per Cederqvist  <ceder@ceder.dyndns.org>

354
355
356
	Ignore harmless warnings from fsusage.c.
	* scripts/warnings.sed: Ignore warnings produced by fsusage.c.
	
Per Cederqvist's avatar
Per Cederqvist committed
357
358
359
360
	Fixed typo.
	* m4/Makefile.am (EXTRA_DIST): Fixed typo: "intmax_t.m4" ->
	"uintmax_t.m4".

361
362
363
	Port checkkomspace to non-GNU systems.
	* src/server/Makefile.am (checkkomspace_SOURCES): Added $(GETOPT).

Per Cederqvist's avatar
Per Cederqvist committed
364
365
366
367
368
369
370
371
372
	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.

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
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
	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.

443
444
445
446
447
448
449
450
451
452
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
453
454
455
456
2003-08-30  Per Cederqvist  <ceder@ceder.dyndns.org>

	* Release 2.1.2.

457
458
2003-08-29  Per Cederqvist  <ceder@ceder.dyndns.org>

Per Cederqvist's avatar
Per Cederqvist committed
459
460
461
462
463
464
465
	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.

466
467
468
469
470
471
472
473
474
475
476
477
478
479
	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
480
481
482
483
484
	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.
485
486
487
488
489
490
491
492
493
494
495

	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".
496
497
	* src/server/testsuite/lyskomd.0/37.exp: Updated the expected
	timeouts for the garb tuning.
498
499
500
501
	
	Document the garb.  (Bug 194).
	* doc/Protocol-A.texi (Garb): New chapter.
	
502
503
504
505
506
	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.

507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
	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.

527
528
2003-08-28  Per Cederqvist  <ceder@ceder.dyndns.org>

Per Cederqvist's avatar
Per Cederqvist committed
529
530
531
532
	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.

533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
	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.

557
558
559
560
561
562
563
564
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}.

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
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
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.
640
	(prot_a_type.protover): New method.
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
	(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.

682
683
684
685
2003-08-26  Per Cederqvist  <ceder@ceder.dyndns.org>

	* Release 2.1.1.

686
687
2003-08-25  Per Cederqvist  <ceder@ceder.dyndns.org>

688
689
690
691
692
693
694
695
696
	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.

697
698
699
700
	Create var/lyskomd/exportdb during install.  (Bug 1119).
	* run-support/Makefile.am (install-data-local): Create
	var/lyskomd/exportdb.

701
702
703
704
705
706
707
708
	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.

709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
	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.

731
732
733
734
2003-08-24  Per Cederqvist  <ceder@ceder.dyndns.org>

	* Release 2.1.0.

735
736
737
738
739
740
741
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).

742
743
2003-08-23  Per Cederqvist  <ceder@ceder.dyndns.org>

Per Cederqvist's avatar
Per Cederqvist committed
744
745
746
747
748
749
	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.

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
	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.

778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
	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
793
	* NEWS: Added info about bad-bool.
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
	* 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
811
812
813
	* 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.
814
815
	* src/server/testsuite/lyskomd.0/48.exp: New file: Test the
	bad-bool error code.
816
817
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	48.exp.
818
819
820
821
822
823
824
825
826
827
828
829
830
831

	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.

832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
	"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".

862
	Release administrativa.
Per Cederqvist's avatar
Per Cederqvist committed
863
	* NEWS: Updated for the 2.1.0 release.
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
	* 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.

881
882
2003-08-22  Per Cederqvist  <ceder@ceder.dyndns.org>

883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
	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
911
912
913
914
915
916
	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.

917
918
919
920
921
922
	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.

923
924
925
926
927
928
929
930
	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.

931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
	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.

982
983
2003-08-20  Per Cederqvist  <ceder@ceder.dyndns.org>

Per Cederqvist's avatar
Per Cederqvist committed
984
985
986
987
988
989
990
991
	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.

992
993
994
995
996
997
998
999
1000
1001
1002
1003
	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
1004
	* doc/constructs.expected: Updated.
1005

1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
	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.

1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
	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.

1051
1052
1053
1054
	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.

1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
	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.
1076
	* src/server/testsuite/lyskomd.0/41.exp: Don't expect bug 178.
1077
1078
1079
1080
1081
	* 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.

1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
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
1162
1163
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
	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.

1203
1204
2003-08-19  Per Cederqvist  <ceder@ceder.dyndns.org>

1205
1206
1207
1208
	Test permissons for setting the canonical-name aux-item.
	* src/server/testsuite/lyskomd.0/45.exp: Test that only an enabled
	admin can set a canonical-name aux-item on the system.

1209
1210
1211
1212
1213
1214
1215
1216
	Improve aux-item documentation.
	* doc/Protocol-A.texi (About Aux-Items): Reduce the amount of text
	talking about aux-items on persons.
	(Aux-Item Inheritance): New node.
	* doc/lyskomd.texi (Aux-Item Definition File): Document that
	author-only and supervisor-only has no effect on items placed on
	the system.

1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
	Speed up the test suite slightly.
	* src/server/testsuite/lyskomd.0/gen-19.py (DEBUG): Turn it off.

	Improve documentation on set-connection-time-format, and make it
	recommended.
	* doc/Protocol-A.texi (Common Types): Mention that times can be
	expressed in UTC if the set-connection-time-format request has
	been used.
	(get-last-text): Ditto.
	(set-connection-time-format): Change the status from experimental
	to recommended.
	* doc/constructs.expected: Updated.

1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
	Fixed a crash in setup_timer().
	* src/libraries/libmisc/timeval-util.c (setup_timer): Fixed a
	fence error that triggered an assertion with a probability of one
	in a million.

	Warn about using SIGWINCH to read a new aux-item file.  If there
	is a syntax error, the server will abort.
	* doc/lyskomd.texi (Parameters): Warn about Bug 1095.
	(Signals): Ditto.

	Test parsing of broken aux-items at runtime.
	* src/server/testsuite/lyskomd.0/46.exp: New file: Test parsing a
	broken aux-item file as a result of SIGWINCH.
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	46.exp.
	* src/server/testsuite/config/unix.exp (lyskomd_death): New
	reason: "restart_kom".
	* src/server/testsuite/lyskomd.0/aux-items-bad.conf: New file with
	syntax errors.

1250
1251
1252
1253
1254
2003-08-18  Per Cederqvist  <ceder@ceder.dyndns.org>

	Write test case for aux-item inheritance.
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	45.exp.
1255
1256
	* src/server/testsuite/lyskomd.0/45.exp: New file: Test aux-item
	inheritance.
1257

1258
1259
2003-08-17  Per Cederqvist  <ceder@ceder.dyndns.org>

1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
	Simplified the statistics code.  Don't crash if the time moves
	backwards, but log a nice error message including how much the
	time moved.
	* src/server/connections.c (set_time): Log how much the time moves
	backwards when it moves backwards.
	* src/server/stats.h (check_all_stats): Removed. 
	* src/server/stats.c: Don't attempt to keep a running average.
	Rounding errors are far too common.  Recompute it whenever it is
	requested instead.  This results in simpler code as well.
	(dump_stats): Removed.
	(update_one_stat): Check if the time moves backward, to avoid
	triggering an assertion.
	(is_nonzero): Removed.
	(check_all_stats): Removed.
	* src/server/ramkomd.c (main): Removed calls to check_all_stats().

1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
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
	Simplify handling of the sent_by misc-info.  Allow the supervisor
	of the author and sender to modify or remove a recipient (Bug 966,
	Bug 181 and Bug 1089).  Don't allow a text to be both a footnote
	and a comment of the same text at the same time (Bug 1090).  Code
	cleanup.
	* doc/Protocol-A.texi (add-comment): Added error codes
	already-comment and already-footnote.
	(add-footnote): Added error codes already-comment.
	* src/server/text.c (find_textlink): New static function.
	(is_supervisor_of_sender): New static function.
	(is_sender): Removed.
	(is_comm_sender): Removed.
	(is_comment_to): Removed.
	(recp_sent_by): Removed.
	(is_footnote_to): Removed.
	(sender): Removed.
	(do_add_footnote): New arguments: the Text_stat objects.  All
	callers updated.
	(do_add_comment): Ditto.
	(do_add_recipient): The text_s argument may no longer be NULL.
	All callers updated.
	(skip_recp): New simplified API.
	(filter_secret_info): Use is_supervisor_of_sender() instead of
	recp_sent_by().  Use the new API of is_supervisor().
	(person_text_read_access): Use is_supervisor_2() instead of
	is_supervisor() until bug 178 is fixed.
	(create_text_add_miscs): New argument: new_stat.  Pass it to
	do_add_footnote(), do_add_comment() and do_add_recipient() for a
	slight performance gain.  All callers updated.
	(delete_text): Use new API of is_supervisor().
	(add_recipient): Allow the supervisor of the author to modify the
	recipient (fixes bug 966).  Allow the supervisor of the sender to
	modify the recipient (fixes bug 181).
	(sub_recipient): Use the new API of is_supervisor().  Allow the
	supervisor of the sender to remove the recipient (fixes bug
	1089).
	(check_add_textlink): New helper function with the common parts of
	add_comment() and add_footnote().  Don't allow a text to be both a
	footnote and a comment of the same text at the same time (fixes
	bug 1090).
	(add_comment): Move code to check_add_textlink().
	(sub_comment): Use find_textlink() instead of is_comment_to().
	Use new API of is_supervisor().  Allow the supervisor of the
	sender to remove the comment link.
	(add_footnote): Use check_add_textlink() to simplify the code.
	(sub_footnote): Use find_textlink() instead of is_footnote_to().
	Use new API of is_supervisor().
	* src/server/session.c (login_old): Use new API of
	is_supervisor().  Simplify and reindent code.
	(login): Ditto.
	(disconnect): Ditto.
	* src/server/person.c (set_passwd): Use new API of
	is_supervisor().  Simplify and reindent code.
	* src/server/membership.c (access_perm_helper): Use new API of
	is_supervisor().  Simplify and reindent code.
	(sub_member): Ditto.
	(add_member_common): Ditto.
	(do_get_members): Ditto.
	* src/server/conference.c (is_supervisor): Replaced the Pers_no
	and Person arguments with a Connection argument.
	(is_supervisor_2): New function, with the old API of
	is_supervisor().
	(set_permitted_submitters): Use new API of is_supervisor().
	(set_super_conf): Ditto.
	* src/server/aux-items.c (filter_aux_item_list): Use new API of
	is_supervisor().
	(check_delete_aux_item_list): Ditto.
	* src/server/manipulate.h (is_supervisor): Replaced the Pers_no
	and Person arguments with a Connection argument.
	(is_supervisor_2): New function, with the old API of
	is_supervisor().  This is only used in one place, and will be
	removed when bug 178 is fixed.
	* src/server/testsuite/lyskomd.0/44.exp: Bugs 966, 181, 1089 and
	1090 are now fixed.
	* src/server/testsuite/lyskomd.0/14.exp: Bug 181 is now fixed.

1352
1353
1354
1355
1356
1357
1358
	Added test cases for bug 1090.
	* src/server/testsuite/lyskomd.0/44.exp: Added test cases for bug
	1090.
	* src/server/testsuite/config/unix.exp (good_bad_expect): Handle
	the case where the bad result contains only a success indicator
	and a refno (such as "=1032").

1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
	Allow recipients to be converted in a few more cases.
	* doc/Protocol-A.texi (add-recipient): The permission-denied error
	code is given if you are not supervisor of the author, recipient
	or sender.  The condition used to be more restrictive.

	Test suite fixes.
	* src/server/testsuite/lyskomd.0/14.exp: Simplified the code by
	using good_bad_expect.
	* src/server/testsuite/lyskomd.0/41.exp: Fixed typo in a comment.

Per Cederqvist's avatar
Per Cederqvist committed
1369
	Added test cases for bug 181, bug 966 and bug 1089.
1370
1371
	* src/server/testsuite/lyskomd.0/44.exp: New file, that tests
	conversion of recipients from one type to another.
Per Cederqvist's avatar
Per Cederqvist committed
1372
1373
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	44.exp.
1374
1375
1376
1377
1378

	Fixed dist error introduced yesterday.
	* scripts/Makefile.am (EXTRA_DIST): Dont forget to distribute the
	$(noinst_SCRIPTS).

1379
1380
2003-08-16  Per Cederqvist  <ceder@ceder.dyndns.org>

1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
	Send and receive times in UTC, if the clients requests it.  
	(Bug 957).
	* doc/Protocol-A.texi (set-connection-time-format): New request.
	* src/include/services.h (set_connection_time_format): New
	request.
	* src/server/connections.h (Connection): Added use_utc.
	* src/server/fncdef.txt: Added set_connection_time_format.
	* src/server/text.c (get_last_text): Handle use_utc.
	* src/server/session.c (set_connection_time_format): New
	function.
	* src/server/prot-a-output.c (prot_a_output_time): Handle use_utc.
	* src/server/internal-connections.c (init_connection): Initialize
	use_utc.
	(new_client): Ditto.
	* src/server/prot-a-parse.c (prot_a_parse_misc_info): This code
	used to convert the broken-down time to a time_t using mktime().
	The value was never used.  Instead of introducing a portability
	problem using by calling timelocal(), we now simply store a 0 in
	the time field of rec_time and sent_at misc-infos.
	* src/server/testsuite/lyskomd.0/01.exp: Test
	set_connection_time_format.
	* src/server/testsuite/lyskomd.0/03.exp: Ditto.
	
	Installation fixes.
	* README: Fixed minor error in upgrade instructions.
	* run-support/Makefile.am (install-data-local): Create var/run,
	which will hold the pid file.

1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
	New async: async-text-aux-changed.  (Bug 910).
	* doc/Protocol-A.texi (Client-Specific Aux-Item Types): Reserve
	10200-10299 for private test use.  Refer to Bugzilla.
	(async-text-aux-changed): New async message.
	* src/server/async.h (enum async): Added ay_text_aux_changed.
	* src/server/prot-a-send-async.h, src/server/prot-a-send-async.c
	(prot_a_async_text_aux_changed): New function.
	* src/server/send-async.c, src/server/send-async.h
	(async_text_aux_changed): New function.
	* src/server/session.c (accept_async): Handle ay_text_aux_changed.
	* src/server/text.c (send_async_text_aux_changed): New function.
	(modify_text_info): Call it.
	* src/server/testsuite/lyskomd.0/03.exp: Handle
	async-text-aux-changed.
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	43.exp.
	* src/server/testsuite/lyskomd.0/43.exp: New file.  Test
	async-text-aux-changed.

Per Cederqvist's avatar
Per Cederqvist committed
1428
	Code cleanup.
1429
1430
1431
1432
1433
1434
1435
1436
1437
	* src/server/aux-items.c: Fixed indentation of bool operators.
	(commit_aux_item_list_internal): Removed a redundant "continue".
	(delete_aux_item_list): Fixed cut-n-paste errors in comments.
	(aux_item_list_add_items): Simplified the code.
	* src/server/prot-a-parse.c (prot_a_parse_misc_info_list): Fixed
	a cut-n-paste error: wrong function name in log message.
	* src/server/testsuite/lyskomd.0/00.exp: Removed the "test"
	argument to one of the simple_expect, to help diagnose problems
	where 127.0.0.1 isn't properly resolved.
Per Cederqvist's avatar
Per Cederqvist committed
1438

Per Cederqvist's avatar
Per Cederqvist committed
1439
1440
1441
1442
	The man-pages will stay.
	* HACKING: It is good to have man-pages that refer to the real
	documentation, so don't remove them.  (Bug 77).

1443
1444
1445
1446
1447
	Refer to Bugzilla, not email.  (Bug 724).
	* All files: Change the phrase "Please mail bug reports to
	bug-lyskom@lysator.liu.se." to "Please report bugs at
	http://bugzilla.lysator.liu.se/."

1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
	Make config files refer to their documentation.
	* run-support/aux-items.conf: Added a reference to the
	documentation.
	* run-support/config: Added a reference to the documentation.

	Use better file names, so that lyskomd can be installed in /usr or
	/usr/local.  (Bug 66 and Bug 132).
	* NEWS: Documented all changed path names.
	* README: Removed the warning not to use /usr/local as the
	prefix.  Document how an upgrade should be made.  Document what
	needs to be done when upgrading from pre-2.1.0 to 2.1.0.  The
	binaries are now in "sbin", not "bin".
	* Makefile.am (SUBDIRS): Moved scripts before doc.
	* src/server/server-config.c (assign_path): New define for
	assign_string.
	(unassign_path): New define for unassign_string.
	(parameters): Use assign_path and unassign_path for all path
	parameters, to make them easier to find.  Use default values from
	paths.h instead of hardcoding the defaults in the file.  A lot of
	values have changed; see the summary in the NEWS file.
	(CONFIG_FILE): Removed.  This is now a define in paths.h.
	(compiled_config_file): New constant.
	(get_default_config_file_name): Use compiled_config_file instead
	of CONFIG_FILE.
	(free_default_config_file_name): Ditto.
	* src/server/connections.h: Updated a comment.
	* src/server/Makefile.am (MOSTLYCLEANFILES): Added paths.h.
	(AM_CPPFLAGS): Removed the DEFAULT_PREFIX define.  Use paths.h
	instead.
	(sbin_PROGRAMS): Was: bin_PROGRAMS.
	(BUILT_SOURCES): Added paths.h.
	(.gdbinit): Removed redundant "-f" option to $(RM).
	(DEFP): New constant.
	(paths.h): New target.
	(server-config.o): Added explicit dependency on paths.h.
	* scripts/unprefix: New script.
	* scripts/definepath: New script.
	* scripts/common.make (dbdir): Moved here from
	db-crypt/db/Makefile.am.
	(exportdir): New constant.
	* scripts/Makefile.am (noinst_SCRIPTS): Added unprefix and
	definepath.  Moved lyskomd-copyrights and update-copyright here
	from EXTRA_DIST.
	* run-support/config: Mention that this is installed as
	lyskomd.conf.
	* run-support/Makefile.am (sbin_SCRIPTS): Renamed savecore to
	savecore-lyskom, to avoid confusion with the /usr/bin/savecore
	program on Solaris.
	(MOSTLYCLEANFILES): Track the change.
	(savecore-lyskom): Track the change.
	(install-data-local): Install the config file as lyskomd.conf, not
	config.  Create the lyskomd.cores directory.
	(uninstall-local): Track the name change of lyskomd.conf.
	* src/server/testsuite/config/unix.exp (lyskomd_start): Use the
	old path names, so that we don't have to update the entire test
	suite.
	* doc/lyskomd.texi: Updated the default paths to the new world
	order.
	* db-crypt/db/Makefile.am (dbdir): Moved to common.make.

	Added man pages that refer to the Texinfo documentation for all
	installed programs.  Made the man pages static.
	* doc/man/splitkomdb.8: New file.
	* doc/man/savecore-lyskom.8: New file.
	* doc/man/lyskomd.8: Removed the version number.
	* doc/man/updateLysKOM.8: Removed the version number.
	* doc/man/Makefile.am (man_MANS): Added savecore-lyskom.8 and
	splitkomdb.8.

1517
1518
2003-08-15  Per Cederqvist  <ceder@ceder.dyndns.org>

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
	Distribution fix.
	* mkmi: Always regenerate scripts/depcomp.

	Xenofarm fix.
	* src/server/testsuite/lyskomd.0/person-cov.exp: Added "DNS log
	threshold: 3600" to support a certain slow Xenofarm computer.

	Calculate the file name of the configuration file in a single
	place.  Related code cleanup.
	* src/server/updateLysKOM.c (main): Use
	get_default_config_file_name() to find the config file.
	* src/server/splitkomdb.c (main): Ditto.
	* src/server/komrunning.c (main): Ditto.
	* src/server/dbck.c (main): Ditto.
	* src/server/ramkomd.c (main): Ditto.  Don't set read_config_file
	-- nothing used the value.
	* src/server/server-config.c (read_config_file): Variable removed.
	(CONFIG_FILE): Now static.
	(default_config): New static variable.
	(get_default_config_file_name): New function.
	(free_default_config_file_name): New function.
	(DEFAULT_DBASE_DIR): Removed.
	* src/server/param.h (read_config_file): Variable removed.
	* src/include/kom-config.h (DEFAULT_DBASE_DIR): Removed.
	(CONFIG_FILE): Removed.
	(get_default_config_file_name): New function.
	(free_default_config_file_name): New function.

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
	Handle scheduling of different weights.  The scheduling priority
	must still be 0.
	* doc/lyskomd.texi (Parameters): Document "Default priority", "Max
	priority", "Default weight" and "Max weight".
	* src/server/connections.h (Connection): New field: schedule.
	* src/server/server-config.c (parameters): Added "Default
	priority", "Max priority", "Default weight" and "Max weight".
	(require_less_eq): New static function.
	(read_configuration): Check the new parameters.  For now,
	max_priority must be set to 0, since connections.c can only handle
	a single priority.
	* src/server/param.h (struct kom_par): New fields:
	default_priority, max_priority, default_weight, max_weight.
	* src/server/internal-connections.c (init_connection): Initialize
	the schedule.
	* src/server/connections.c (login_request): Set the priority and
	weight from param.default_priority and param.default_weight.
	(adjust_penalty): Use the weight to reduce the penalty.
	(get_scheduling): Return the actual scheduling information from
	the connection.
	(set_scheduling): Check the priority and weight against
	param.max_priority and param.max_weight.  Allow the user to change
	them, as long as it is done within those limits.  Store the new
	values in the connection.  Note: the current implementation cannot
	handle more than one priority.  The check for that is made in
	server-config.c.
	* src/server/testsuite/get-time-often.c (longopts): Added
	--priority and --weight.
	(main): Handle the new options.
	* src/server/testsuite/lyskomd.0/01.exp: The new default weight is
	20.  The new maximum weight is 100.
	* src/server/testsuite/lyskomd.0/03.exp: Ditto.

1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
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
1632
2003-08-14  Per Cederqvist  <ceder@ceder.dyndns.org>

	Added the set-scheduling and get-scheduling requests.  The current
	implementation only supports priority==0 and weight==1.
	* doc/Protocol-A.texi (Session Information): Added Scheduling-Info.
	(get-scheduling): New request.
	(set-scheduling): New request.
	(Error Codes): Added priority-denied, weight-denied and
	weight-zero.
	* src/server/prot-a.c (prot_a_reply): Handle rt_scheduling_info.
	* src/server/prot-a-output.h, src/server/prot-a-output.c
	(prot_a_output_scheduling_info): New function.
	* src/server/fncdef.txt: Added get_scheduling and set_scheduling.
	* src/server/connections.h (enum res_type): Added
	rt_scheduling_info.
	(union result_holder): Added scheduling_info.
	* src/server/connections.c (get_scheduling): New request.
	(may_change_scheduling): New static function.
	(set_scheduling): New request.
	* src/include/services.h (set_scheduling): New request.
	(get_scheduling): New request.
	* src/include/kom-types.h (Scheduling_info): New struct.
	* src/include/kom-errno.h (enum kom_err): Added
	KOM_PRIORITY_DENIED, KOM_WEIGHT_DENIED and KOM_WEIGHT_ZERO.
	* src/server/testsuite/lyskomd.0/01.exp: Test get-scheduling and
	set-scheduling.
	* src/server/testsuite/lyskomd.0/03.exp: Ditto.

	Test suite improvement.
	* src/server/testsuite/Makefile.am
	(../../libraries/adns/client/adnshost): New target.
	(site.exp): Depend on adnshost, so that "make check" works even if
	"make check" has not been run in the adns directory.

	Minor doc fixes.
	* doc/lyskomd.texi (Parameters): Document the default value of
	"Low penalty".  Removed some text that was left behind a
	cut-n-paste operation.
	(Adding a New Protocol Request): Added a CHK_CONNECTION call to
	the example.

	Changed status of set-keep-commented from experimental to
	recommended.
	* doc/Protocol-A.texi (Protocol Requests): Changed the status of
	set-keep-commented from experimental to recommended.
	(set-keep-commented): Ditto.

	Clarify the description of get-stats-description and get-stats.
	* doc/Protocol-A.texi (get-stats-description): State that this
	always returns the same during a session, so clients can cache
	this value aggressively.
	(get-stats): Elaborate on the access-denied error code.

1633
1634
2003-08-13  Per Cederqvist  <ceder@ceder.dyndns.org>

1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
	Use AM_PATH_PYTHON to find the Python interpreter.  (Bug 329).
	* configure.in: Use AM_PATH_PYTHON.
	(HAVE_PYTHON): New automake conditional.
	* HACKING: Use Automake 1.7.6 with a patch for better Python
	handling.
	* doc/Makefile.am (check-doc): Only perform the tests if
	HAVE_PYTHON is set.  Use $(PYTHON) instead of python.  Print a
	warning if HAVE_PYTHON isn't set.
	* src/server/testsuite/Makefile.am (check-lyskomd): Only perform
	the tests if HAVE_PYTHON is set.  Use $(PYTHON) instead of python.
	Print a warning if HAVE_PYTHON isn't set.
	(check-leaks): Ditto.
	(site.exp): Set python to the Python interpreter found by
	configure.
	* src/server/testsuite/lyskomd.0/Makefile.am ($(srcdir)/15.exp):
	Use $(PYTHON) instead of python.  Use the HAVE_PYTHON Automake
	conditional.
	($(srcdir)/19.exp): Ditto.
	* src/server/testsuite/config/unix.exp (obtain_lock): Use $python
	from site.exp instead of hardcoding "python".
	(client_start): Ditto.
	(client_start_fail): Ditto.
	* scripts/xenofarm.sh: Removed tests for python.  We should get a
	warning message from "make check" if python is missing, but it
	should still succeed.

1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
	Testsuite improvement.
	* src/server/testsuite/lyskomd.0/37.exp: Added "DNS log threshold"
	entries so that a slow DNS server won't interfere with this test.

	Protocol-A.texi was incompatible with the texinfo.tex supplied
	with Automake 1.7.6.
	* doc/Protocol-A.texi (\tensltt): Define this command using TeX
	syntax, and add a \global.  I have only a vague idea what this
	does, but it seems to work with texinfo.tex 2003-05-04.08.

1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
	Create scripts/common.make, and include it from all LysKOM
	Makefile.am files.  Move the RM setting to it.  (Bug 851).
	* scripts/common.make: New file, which contains makefile fragments
	that all makefiles should include.
	(RM): Moved this variable to this file.
	* db-crypt/db/Makefile.am: Include common.make instead of setting
	RM.
	* doc/Makefile.am: Ditto.
	* run-support/Makefile.am: Ditto.
	* src/libraries/libeintr/Makefile.am: Ditto.
	* src/server/testsuite/Makefile.am: Ditto.
	* src/server/testsuite/lyskomd.0/Makefile.am: Ditto.
	* Makefile.am: Include common.make.
	* db-crypt/Makefile.am: Ditto.
	* scripts/Makefile.am: Ditto.
	* src/Makefile.am: Ditto.
	* src/include/Makefile.am: Ditto.
	* src/include/server/Makefile.am: Ditto.
	* src/libraries/Makefile.am: Ditto.
	* src/libraries/libansi/Makefile.am: Ditto.
	* src/libraries/libcommon/Makefile.am: Ditto.
	* src/libraries/libmisc/Makefile.am: Ditto.
	* src/server/Makefile.am: Ditto.
	* src/server/testsuite/config/Makefile.am: Ditto.
	* doc/man/Makefile.am: Ditto.
	
	Automake lint.
	* configure.in: Use new-style call to AM_INIT_AUTOMAKE.

1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
	Implement find-next-conf-no and find-previous-conf-no.  
	(Bug 123).
	* doc/Protocol-A.texi (Server Information): Refer to
	find-previous-conf-no.
	(find-next-conf-no): New request.
	(find-previous-conf-no): New request.
	* src/server/fncdef.txt: Added find_next_conf_no and
	find_previous_conf_no.
	* src/include/services.h, src/server/conference.c
	(find_next_conf_no): New function.
	(find_previous_conf_no): New function.
	* src/server/testsuite/lyskomd.0/01.exp: Test find_next_conf_no
	and find_previous_conf_no.
	* src/server/testsuite/lyskomd.0/03.exp: Ditto.
	* src/server/testsuite/lyskomd.0/41.exp: Ditto.

1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
	The test suite failed on really really slow computers.
	* src/server/testsuite/config/unix.exp (lyskomd_start): Increase
	the "Connect timeout" and "Login timeout" to 1 day, unless the
	test specifies them.  I suspect that the "Connect timeout"
	interfered with a test on one of the slower members of the
	Xenofarm.
	* src/server/testsuite/lyskomd.0/38.exp: Fixed a race condition:
	if the client was killed at the wrong time, the test would crash.
	* src/server/testsuite/lyskomd.0/37.exp: Pass a $base_config to
	lyskomd_start in the other place as well.  The fix made on
	2003-08-07 was incomplete.

1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
	Implement first-unused-conf-no and first-unused-text-no.
	(Bug 121).
	* doc/Protocol-A.texi (first-unused-conf-no): New request.
	(first-unused-text-no): New request.
	(Server Information): Refer to the new requests instead of
	inferior ways to get the same information.
	* src/include/services.h (first_unused_conf_no): New function.
	(first_unused_text_no): New function.
	* src/server/text.c (first_unused_text_no): New function.
	* src/server/simple-cache.c (query_next_conf_no): New function.
	* src/server/prot-a.c (prot_a_reply): Handle rt_conf_no.
	* src/server/prot-a-output.h, src/server/prot-a-output.c
	(prot_a_output_conf_no): New function.
	* src/server/fncdef.txt: Added first_unused_conf_no and
	first_unused_text_no.
	* src/server/connections.h (enum res_type): Aded rt_conf_no.
	(union result_holder): Added conf_no.
	* src/server/conference.c (first_unused_conf_no): New function.
	* src/server/cache.h (query_next_conf_no): New function.
	* src/server/testsuite/lyskomd.0/01.exp: Test
	114:first-unused-conf-no and 115:first-unused-text-no.
	* src/server/testsuite/lyskomd.0/03.exp: Ditto.
	* src/server/testsuite/lyskomd.0/41.exp: Ditto.

	Makefile improvements that might help portability to
	CYGWIN_NT-5.0.
	* src/server/testsuite/Makefile.am (AM_CPPFLAGS): Added ../../..,
	so that config.h is properly found.
	* src/server/Makefile.am (aux.h): Don't append to a non-existing
	file; use ">" instead of ">>" to create it.

1759
1760
2003-08-12  Per Cederqvist  <ceder@ceder.dyndns.org>

1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
	Implement and use has_access() to simplify code.  (Bug 723).
	* src/server/manipulate.h, src/server/membership.c (has_access):
	New function.  This is a simple wrapper around access_perm that
	simplifies the code.
	* src/server/membership.c (filter_conf_no): Use has_access()
	instead of access_perm() to simplify code.
	(sub_member): Ditto.
	(add_member_common): Ditto.
	* src/server/text.c (filter_secret_info): Ditto.
	(add_recipient): Ditto.
	(sub_recipient): Ditto.
	* src/server/send-async.c (async_new_name): Ditto.
	(async_new_user_area): Ditto.
	* src/server/regex-match.c (lookup_regexp): Ditto.
	* src/server/person.c (do_query_read_texts): Ditto.
	* src/server/conference.c (set_conf_errno): Ditto.
	(lookup_name): Ditto.
	(lookup_z_name): Ditto.
	(do_lookup): Ditto.
	(send_async_new_presentation): Ditto.
	(send_async_new_motd): Ditto.
	(modify_conf_info): Ditto.
	* src/server/admin.c (send_message): Ditto.
	* doc/lyskomd.texi (Adding a New Protocol Request): Fixed broken
	code example.  Use has_access() instead of access_perm().

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
1812
1813
	lyskomd is now officially shut down via SIGTERM.  (SIGHUP still
	works, and SIGINT also shuts it down.)  (Bug 808).
	* doc/lyskomd.texi (Parameters): lyskomd is now officially shut
	down by SIGTERM, not SIGHUP.
	(Signals): Ditto.  However, SIGHUP and SIGINT also works.
	(Administration): Recommend SIGTERM, not SIGHUP.
	(Bugs): Removed entry about terminating on SIGINT and SIGTERM.
	* src/server/testsuite/config/unix.exp (lyskomd_death): The reason
	"signal" now means SIGTERM.  Also handle "sighup" and "sigint".
	* src/server/updateLysKOM.c (checkstatus): Use SIGTERM, not
	SIGHUP.
	* src/server/sigflags.h: Updated a comment: SIGTERM is now the
	official way to shut down lyskomd.
	* src/server/ramkomd.c (server_init): Handle SIGTERM and SIGINT
	the same way as SIGHUP: shut down.
	(main): Ditto.
	(sighandler_term): New name for former sighandler_hup.  Log proper
	message depending on which signal was used to shut down the
	server.
	* src/server/komrunning.c (shutdown_lyskom): Use SIGTERM, not
	SIGHUP, to shut down lyskomd.
	* src/server/connections.c: Updated a comment: SIGTERM is now the
	official way to shut down lyskomd.
	* src/server/testsuite/lyskomd.0/31.exp: Test to shut down the
	server by both SIGTERM, SIGHUP and SIGINT.
	* src/server/testsuite/lyskomd.0/07.exp: Use TERM instead of HUP
	to shut down lyskomd.
1814
1815
1816
1817
1818
1819
1820
1821
	* src/server/testsuite/lyskomd.0/11.exp: Ditto.
	* src/server/testsuite/lyskomd.0/30.exp: Ditto.
	* src/server/testsuite/lyskomd.0/37.exp: Ditto.
	* src/server/testsuite/lyskomd.0/38.exp: Ditto.
	* src/server/testsuite/lyskomd.0/39.exp: Ditto.
	* src/server/testsuite/lyskomd.0/bug-48.exp: Ditto.
	* src/server/testsuite/lyskomd.0/bug-52.exp: Ditto.
	* src/server/testsuite/lyskomd.0/bug-810.exp: Ditto.
1822

1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
	The same text can no longer be FAQ for the same conference twice.
	(Bug 572).
	* run-support/aux-items.conf (faq-conf): Added unique-data, so
	that the same text cannot be faq for a conference more than once.
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	bug-572.exp.
	* src/server/testsuite/lyskomd.0/bug-572.exp: New file.  Test that
	the same text cannot be FAQ for the same conference more than
	once.

	Added support for aux-items that must contain a unique piece of
	data.
	* doc/lyskomd.texi (Aux-Item Definition File): Document
	unique-data.
	* src/server/aux-items.h (struct Aux_item_definition_s): Added
	unique_data.
	* src/server/aux-items.c (empty_aux_item_definition): Added
	unique-data.
	(simple_aux_item): Ditto.
	(aux_item_add_perm): If aux_item_check_unique sets kom_errno,
	don't override it.
	(aux_item_check_unique): Check for unique_data violations.
	* src/server/aux-item-def-parse.y (assign): Handle unique-data.
	(parse_aux_item_definitions): Handle unique-data in the debug code
	that prints the parsed aux-item.

1849
1850
1851
1852
1853
1854
1855
	"./configure && make install" no longer fails.  (Bug 856).
	* src/server/Makefile.am (connections.o): Add an explicit
	dependency on prot-a-parse-arg.h so that "./configure&&make
	install" works.
	* HACKING: Before a release, a "./configure&&make install" check
	should be made.

Per Cederqvist's avatar
Per Cederqvist committed
1856
1857
1858
1859
1860
	Test suite fix.
	* src/server/testsuite/lyskomd.0/regexp-match-cov.exp: Re-updated
	expected leak count.  Since the leak due to bug 689 is now
	suppressed, it only shows up among the suppressions.

1861
1862
1863
1864
1865
	The get-boottime-info implementation caused compilation errors
	unless DEBUG_CALLS was defined.
	* src/server/simple-cache.c: services.h and manipulate.h are
	always needed.

1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
	Added get-boottime-info.  (Bug 6).
	* src/server/testsuite/lyskomd.0/03.exp,
	src/server/testsuite/lyskomd.0/01.exp: Test get-boottime-info.
	* src/server/stats.h, src/server/stats.c (read_stat_value): New
	function.
	* src/server/simple-cache.c (boottime_info): New static variable.
	(init_cache): Initialize boottime_info.
	(get_boottime_info): New request.
	* src/server/prot-a.c (prot_a_reply): Handle
	rt_static_server_info.
	* src/server/prot-a-output.h, src/server/prot-a-output.c
	(prot_a_output_static_server_info): New function.
	* src/server/fncdef.txt: Added get_boottime_info.
	* src/server/connections.h (enum res_type): Added
	rt_static_server_info.
	(union result_holder): Added static_server_info.
	* src/include/services.h (get_boottime_info): New request.
	* src/include/kom-types.h (Static_server_info): New type.
	* doc/constructs.expected: Updated.
	* doc/Protocol-A.texi (Server Information): Document
	Static-Server-Info.
	(get-boottime-info): New request.

	Measure the number of existing conferences and persons.
	* src/server/testsuite/lyskomd.0/03.exp,
	src/server/testsuite/lyskomd.0/01.exp: Test STAT_CONFS and
	STAT_PERSONS.
	* src/server/stats.h (enum stat_type): Added STAT_CONFS and
	STAT_PERSONS.
	* src/server/stats.c (name): Handle STAT_CONFS and STAT_PERSONS.
	* src/server/simple-cache.c (init_cache): Update STAT_CONFS and
	STAT_PERSONS.
	* src/server/person.c (do_delete_pers): Update STAT_PERSONS.
	(create_person_generic): Update STAT_PERSONS and STAT_CONFS.
	* src/server/conference.c (do_delete_conf): Update STAT_CONFS.
	(do_create_conf): Ditto.
	* doc/Protocol-A.texi (Measured Properties): Added "confs" and
	"persons".

1905
1906
2003-08-11  Per Cederqvist  <ceder@ceder.dyndns.org>

1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
	Testsuite fixes.
	* src/server/testsuite/lyskomd.0/41.exp: Code cleanup.
	* src/server/testsuite/lyskomd.0/regexp-match-cov.exp: Updated
	expected suppressed leak count.

	Test handling of the keep-commented field and its interaction with
	the garb.  Added the debug request backdate_comment_link.  (Bug 902).
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	42.exp.
	* src/server/testsuite/lyskomd.0/42.exp: New file.  Test
	keep-commented handling.
	* src/server/fncdef.txt: Added backdate_comment_link.
	* src/server/debug.c (backdate_comment_link): New debug request.
	* src/include/services.h (backdate_comment_link): New debug
	request.

1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
	Comments and footnotes now protect the parent text from being
	garbed until the comment is keep_commented days old.  (Bug 902).
	* src/include/kom-types.h (Small_conf): Added keep_commented.
	* src/server/cache.h (cached_get_keep_commented): New function.
	* src/server/text-garb.c (saved_by_recipient): Code cleanup.
	(find_comment_limit_and_age): New static function.
	(saved_by_keep_commented): New static function.
	(saved): Call saved_by_keep_commented.
	* src/server/simple-cache.c (mark_conference_as_changed): Copy
	the keep_commented field to the small_conf.
	(setup_small_conf): Ditto.
	(init_small_conf): Initialize keep_commented.
	(cached_get_keep_commented): New function.
	* src/server/dbck-cache.c (cached_get_keep_commented): New
	function.

	Code cleanup.
	* src/server/conference.c: Fixed a cut-n-paste comment error.

1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
	Add a valgrind suppression.
	* src/server/testsuite/lyskomd.supp: Added a suppression for a
	known leak in regex_compile().

	Reorganized text-garb.c for readability.
	* src/server/text-garb.c (day_to_sec): New constant.
	(default_save): New constant.
	(saved_by_aux): New static helper function.
	(saved_by_recipient): Ditto.
	(saved_by_comment): Ditto.
	(saved): Ditto.
	(garb_text): Use the saved() function to simplify code.

1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
2003-08-10  Per Cederqvist  <ceder@ceder.dyndns.org>

	Use valgrind-20030725.  Use leak suppression to ignore harmless
	leaks we cannot fix.  (Bug 974).
	* scripts/warnings.sed: Adjusted a line number.
	* src/server/testsuite/lyskomd.0/regexp-match-cov.exp: Updated for
	valgrind-20030725.
	* src/server/testsuite/lyskomd.0/aux-items-cov.exp: The possible
	leaks are now suppressed.
	* src/server/testsuite/config/unix.exp (check_valgrind): The
	expected_leaks argument should now include the number of
	suppressed memory leaks.  Ignore up to 25 suppressed leaks.  Don't
	ignore any reachable leaks.
	* src/server/testsuite/lyskomd.supp: Updated for
	valgrind-20030725.  Add suppressions of known harmless memory
	leaks.

1972
1973
2003-08-08  Per Cederqvist  <ceder@ceder.dyndns.org>

1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
	Implement async-new-motd.  (Bug 906).
	* doc/Protocol-A.texi (async-new-motd): New async message.
	* src/server/async.h (enum async): Added ay_new_motd.
	* src/server/session.c (accept_async): Handle ay_new_motd.
	* src/server/send-async.h, src/server/send-async.c
	(async_new_motd): New function.
	* src/server/prot-a-send-async.h, src/server/prot-a-send-async.c
	(prot_a_async_new_motd): New function.
	* src/server/conference.c (send_async_new_motd): New function.
	(do_set_etc_motd): Call it.  Clean up variable names.
	* src/server/testsuite/lyskomd.0/conference-cov.exp: Track change
	in error message from do_set_etc_motd.
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	41.exp.
	* src/server/testsuite/lyskomd.0/41.exp: Test async-new-motd.
	* src/server/testsuite/lyskomd.0/03.exp: Handle ay-new-motd.
	* src/server/testsuite/lyskomd.0/40.exp: Fixed a broken comment.

1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
	Implement async-new-presentation.  (Bug 904).
	* src/server/session.c (accept_async): Handle ay_new_presentation.
	* src/server/send-async.h, src/server/send-async.c
	(async_new_presentation): New function.
	* src/server/prot-a-send-async.h, src/server/prot-a-send-async.c
	(prot_a_async_new_presentation): New function.
	* src/server/conference.c (send_async_new_presentation): New
	function.
	(do_set_presentation): Call it.  Clean up variable names, and
	remember the text statuses of the old and new presentation so they
	can be passed to send_async_new_presentation().  Include the text
	number of the old presentation in the error message that is
	printed if the old presentation lacks a mark.
	* src/server/testsuite/config/unix.exp (client_good_bad_expect):
	New proc.
	(client_extracting_expect): New proc.
	* src/server/testsuite/lyskomd.0/03.exp: Handle
	async-new-presentation.
	* src/server/testsuite/lyskomd.0/40.exp: async-new-presentation is
	now implemented.  Expect bug 178.
	* src/server/testsuite/lyskomd.0/conference-cov.exp: Track change
	in error message from do_set_presentation.

2015
2016
2017
2018
2019
2020
2021
2022
2023
	Document async-new-presentation and write a test suite for it.
	(Bug 904).
	* doc/Protocol-A.texi (async-presentation-changed): New async.
	* src/server/async.h (enum async): Added ay_new_presentation.
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	40.exp.
	* src/server/testsuite/lyskomd.0/40.exp: Test async-new-presentation.
	* src/server/testsuite/config/unix.exp (client_expect): New proc.

2024
2025
2003-08-07  Per Cederqvist  <ceder@ceder.dyndns.org>

2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
	The test suite failed on really really slow computers.
	* src/server/testsuite/lyskomd.0/37.exp: Pass a $base_config to
	lyskomd_start, since we don't want lyskomd_start to modifiy the
	compiled-in default of "Sync interval".
	* src/server/testsuite/config/unix.exp (lyskomd_start): Set the
	"Sync interval" to 1 day, so that it doesn't interfere with the
	tests.  Added a colon to the strings that extra_config is checked
	against, so that parameters that are prefixes of other parameters
	are handled correctly.

	Stats improvements.
	* src/server/stats.c: The "updates" field now counts incremental
	updates of avenrun.
	(update_history): Adjusted.
	(update_one_stat): Adjusted.
	(check_one_stat): Adjusted.

2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
	Make it easier to change the file descriptor reserved for
	valgrind.  Don't use a file descriptor that interferes with the
	test suite.
	* src/server/testsuite/config/unix.exp (PROTECTED_FDS): Added a
	comment that refers to ../Makefile.am.  Check that valgrind_fd is
	set properly.
	(lyskomd_host): This is now set in site.exp, not here.
	(l2g_start): Use valgrind_fd instead of hardcoding the value.
	(spawn_lyskomd): Ditto.
	(dbck_run): Ditto.
	* src/server/testsuite/Makefile.am (VALGRIND_FD): New constant,
	set to 21.  Added a comment that refers to PROTECTED_FDS in
	unix.exp.
	(site.exp): Set lyskomd_host to whatever 127.0.0.1 resolves to,
	or 127.0.0.1 if it cannot be looked up at all.  Set valgrind_fd to
	the constant defined in VALGRIND_FD.
	(valgrind.wrap): Use VALGRIND_FD, instead of hardcoding the value
	in two places.  Changed the valgrind file descriptor to 21, which
	is currently the highest reserved file descriptor.
2062
2063
2064
	(check_DATA): Was: noinst_DATA.   site.exp should not be built
	until adnshost is built, and the other stuff in noinst_DATA was
	also not needed until check time.
2065
2066
2067
2068
2069
2070

	Don't log simple reverse lookup errors for localhost, since they
	interfere with the test suite and are fairly common and harmless.
	* src/server/connections.c (dns_resolution): Don't log errors if
	the lookup of localhost fails due to "nxdomain" or "inconsistent".

2071
2072
2073
2074
2075
2076
2077
	The AIX 4.2 and 4.3 builds have failed the tests for max open
	clients since we enabled ADNS.  Attempt to fix.  But can they
	really have an extra overhead of 8-9 file descriptors?
	* src/include/kom-config.h (PROTECTED_FDS): Account for the two
	file descriptors used by ADNS.
	* src/server/testsuite/config/unix.exp: Ditto.

2078
2079
2080
2081
2082
	Send async-rejected-connection even to sessions where the reverse
	DNS lookup hasn't completed yet.
	* src/server/internal-connections.c (handshake_ok): Actually 
	ignore the dns_done field when told to do so.

2083
2084
2003-08-06  Per Cederqvist  <ceder@ceder.dyndns.org>

2085
2086
2087
2088
2089
	Don't crash if shut down with a pending reverse DNS lookup.
	* src/server/connections.c (dns_resolution): Don't re-enable idle
	check during shutdown.  Simplify code.
	(toploop): Simplify code by using enable_idle_check().

2090
2091
2092
2093
2094
	Test suite: Obtain the name "localhost" using adns.
	* src/server/testsuite/config/unix.exp (lyskomd_host): Use
	adnshost to set it, so that it is set the same way as when lyskomd
	is running.

2095
2096
2097
2098
2099
2100
2101
	Compile the adnshost program during "make check".
	* src/libraries/adns/Makefile.am (SUBDIRS): Added client.
	* src/libraries/adns/configure.in: Generate client/Makefile.
	* src/libraries/adns/client/Makefile.am: New file.  Compile
	adnshost as part of the "make check" phase.
	* src/libraries/adns/client/Makefile.in: Removed.

2102
2103
2104
	Document undocumented TeX code.  (Bug 195).
	* doc/Protocol-A.texi: Document some TeX code.

2105
2106
2107
2108
	Fix the "make check" target in liboop.
	* src/libraries/liboop/test-oop.c (get_name): Adjusted the call to
	oop_adns_submit.

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
	Use ADNS, so that IPv4 reverse DNS lookups are non-blocking.
	Since ADNS does not yet support IPv6, reverse lookups of IPv6
	addresses are still blocking.  (Bug 627).
	* src/server/prot-a.c (prot_a_parse_packet): Skip whitespace when
	blocking the client waiting for a DNS reply.
	* src/server/connections.c (parse_unparsed): Return immediately if
	the session became blocked by DNS.
	(dns_resolution): Schedule an idle check, as a client may have
	become unblocked.  Don't call isc_enable() here.  Instead, add the
	session to the run-queue.  There may be pending input in the input
	buffer.  Handle ADNS errors.
	(login_request): Check the return value of isc_resolve_remote().
	(read_from_connection): Return if the session is blocked by DNS.
	* src/server/testsuite/lyskomd.0/regexp-match-cov.exp: After the
	adns integration, we need to ignore 25 unreachable blocks.
	* src/server/testsuite/lyskomd.0/aux-items-cov.exp: After the
	adns integration, we need to ignore 25 unreachable blocks.
	* src/server/testsuite/config/unix.exp (check_valgrind): After the
	adns integration, we need to ignore 25 unreachable blocks.

	Added the ability to do reverse queries to the oop adns adapter.
	* src/libraries/liboop/oop-adns.h, src/libraries/liboop/adns.c
	(oop_adns_submit): New argument: errcode.
	(oop_adns_submit_reverse): New function.

2134
2135
2003-08-05  Per Cederqvist  <ceder@ceder.dyndns.org>

2136
2137
2138
2139
2140
2141
	Update testsuite: clients that hasn't completed the handshake
	should be invisible.
	* src/server/testsuite/lyskomd.0/connections-cov.exp:
	Disconnecting a client that hasn't declared a protocol yet now
	should fail.

Per Cederqvist's avatar
Per Cederqvist committed
2142
2143
2144
2145
	"make clean" fix.
	* src/server/testsuite/Makefile.am (MOSTLYCLEANFILES): Added 
	memory-usage-*.log.

2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
	Use a callback-based API for DNS lookup, in preparation for ADNS
	integration.  Block clients, and make them invisible for all other
	clients, until the DNS lookup has completed.
	* doc/lyskomd.texi (Files): Document the handshake_ok field of
	connections.txt.
	(Function Templates for send-async.c): Include a call to
	handshake_ok() in prototype code.
	(Traversing Connections): Ditto.
	* src/server/session.c:  All users of the hostname updated to get
	it from the isc_scb.
	(who_is_on): Removed dead code.
	(who_is_on_ident): Ditto.
	(who_is_on_dynamic): Removed dead code.  Don't include sessions
	until the handshake is completed.
	(get_session_info): Don't include sessions until the handshake is
	completed.
	(get_static_session_info): Don't include sessions until the
	handshake is completed.  
	(get_session_info_ident): Ditto.
	(disconnect): Don't include sessions until the handshake is
	completed.
	(get_client_name): Ditto.
	(get_client_version): Ditto.
	* src/server/send-async.c (async_new_text_old): Use handshake_ok()
	to check if it is OK to send the message to the client.  As a
	result, the message will not be sent until the DNS lookup has
	completed.
	(async_new_text): Ditto.
	(async_i_am_on): Ditto.
	(async_logout): Ditto.
	(async_new_name): Ditto.
	(async_forced_leave_conf): Ditto.
	(async_login): Ditto.
	(async_deleted_text): Ditto.
	(async_new_recipient): Ditto.
	(async_sub_recipient): Ditto.
	(async_new_membership): Ditto.
	(async_new_user_area): Ditto.
	(async_garb_ended): Ditto.
	(async_sync_db): Ditto, but ignore the DNS lookup.
	(async_rejected_connection): Ditto.
	* src/server/prot-a.c (prot_a_parse_packet): Disable the session
	after the initial handshake if the dns resolution hasn't completed
	yet.
	* src/server/membership.c (send_async_new_membership): Indentation
	fixed.
	* src/server/internal-connections.h (enum ignored_conditions): New
	enum.
	(handshake_ok): New function.
	* src/server/internal-connections.c (init_connection): Updated to
	initialize all fields.  Several were forgotten.
	(kill_client): Clear the remote_ip.
	(handshake_ok): New function.
	* src/server/connections.h (Connection): Removed the hostname
	field, since that is now stored as isc_session->remote.  Added
	dns_done, blocked_by_dns, and remote_ip.
	* src/server/connections.c (dump_connections): Include a flag that
	tells if the session has completed the handshake or not.
	(dns_resolution): New function.
	(get_host_name): Removed.
	(login_request): Reorganized the code to use the new
	callback-driven API of ISC host lookups.
	* src/server/admin.c (shutdown_kom): Get the host name from the
	isc_scb, now that the information is no longer stored in the
	connection.
	* src/libraries/libmisc/timeval-util.h,
	src/libraries/libmisc/timeval-util.c (timeval_diff_d): New
	function.

	The session_start field of a Connection was used both to record
	the connect time and the login/logout time.  As a result, the
	connection-time of a Static-Session-Info was not actually static.
	Fixed by keeping track of the connect time and the login/logout
Per Cederqvist's avatar
Per Cederqvist committed
2219
	time separately.
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
	* src/server/connections.h (Connection): Replaced the
	session_start field with connect_time and login_time.  All users
	updated.  
	* src/server/session.c: (login_old): Set login_time, not connect_time.
	(login): Ditto.
	(logout): Use login_time, not connect_time.
	(get_session_info): Use connect_time, not login_time, as the
	connection_time.
	(get_static_session_info): Use connect_time, not login_time, as the
	connection_time.
	(get_session_info_ident): Ditto.
	* src/server/internal-connections.c (new_client): Set both
	connect_time and login_time.
	* src/server/connections.c (handle_accept_event): Call set_time(),
	so that the connect_time is set correctly.

2236
2237
2003-08-04  Per Cederqvist  <ceder@ceder.dyndns.org>

2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
	Don't leave whitespace in the input buffers.
	* src/server/prot-a.c (prot_a_parse_packet): Delete leading and
	trailing whitespace, to avoid having it linger in the input
	buffer.
	* src/server/prot-a-parse.h, src/server/prot-a-parse.c
	(prot_a_parse_skip_whitespace): New function.

	Code cleanup.
	* src/server/isc-parse.c (parse_nonwhite_char): Use WHITESPACE
	instead of hardcoding the string.

	Xenofarm: warnings from <float.h>.
	* scripts/warnings.sed: Ignore warnings from lenin.

2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
	Track the simplified API of ISC callback functions.
	* src/server/ramkomd.c (handle_accept_event): Added a forward
	declaration using the isc_accept_callback typedef.
	* src/server/connections.h (handle_accept_event): Adjusted to the
	new API of ISC callback functions.
	* src/server/connections.c (write_err_cb): Adjusted to the new API
	of ISC callback functions.
	(stale_cb): Ditto.
	(idle_cb): Ditto.
	(login_request): Ditto.
	(data_available_callback): Ditto.
	(handle_accept_event): Ditto.

2265
2266
2267
2268
2269
	Slow DNS servers could interfere with the test suite.
	* src/server/testsuite/config/unix.exp (lyskomd_start): Set the
	"DNS log threshold" to one hour, to avoid that it interferes with
	the test suite.

2270
2271
2003-08-03  Per Cederqvist  <ceder@ceder.dyndns.org>

2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
	Track some minor cleanup of ISC.  (Bug 916).
	* src/server/ramkomd.c (server_init): Use the address stored in
	listen_client->laddr instead of calling isc_getladdress().
	* src/server/testsuite/lyskomd.supp: Removed a suppressions for
	calling accept() with NULL pointers.  ISC no longer does that.

	Plug a memory leak in a test program.
	* src/server/testsuite/get-time-often.c (tcp_connect): Plugged a
	memory leak.

2282
2283
2284
2285
2286
2287
	The idle timeouts interfered with some tests on slow computers.
	Fix.
	* src/server/testsuite/lyskomd.0/29.exp (startup): Set the idle
	timeouts to 6 hours, to make sure that they do not interfere with
	the test.

2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
	Bug fixes for the idle client disconnect.
	* src/server/server-config.c (parameters): Changed "Connect
	timeout" to 30 seconds.  Changed "Login timout" to 30 minutes.
	(read_configuration): Don't require the various idle timeouts to
	be longer than the stale timeout.
	* doc/lyskomd.texi (Parameters): Updated the description of the
	idle timeouts.
	* src/server/testsuite/lyskomd.0/39.exp: Extended: test each
	timeout by itself.  Removed the test that "Stale timeout" should
	be less than the idle timeouts, since that is no longer required.
	* src/server/testsuite/lyskomd.0/37.exp: Updated the expected
	values for "Connect timeout" and "Login timeout", and fixed the
	expected default suffix of "Active timeout".

	Bug fixes for get-stats.  (Bug 1072).
	* src/server/stats.c (update_one_stat): The accumulator was not
	updated in a proper way.
	(update_stat): Update the ascending and descending values even
	when the delta is 0, so that they are updated when the get-stats
	request is issued.

2309
2310
2003-08-02  Per Cederqvist  <ceder@ceder.dyndns.org>

2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
	Disconnect idle clients after a few days.  (Bug 11).
	* doc/lyskomd.texi (Parameters): Document "Connect timeout",
	"Login timeout" and "Active timeout".
	* src/server/server-config.c (parameters): Added "Connect timeout",
	"Login timeout" and "Active timeout".
	(require_less): New static function.
	(read_configuration): Check that "Stale timeout" is smaller than
	the three new timeouts.
 	* src/server/param.h (struct param): Added connect_timeout,
	login_timeout and active_timeout.
	* src/server/session.c (login_old): Set the idle timeout to
	param.active_timeout.
	(login): Ditto.
	(logout): Set the idle timeout to param.login_timeout.
	* src/server/ramkomd.c (server_init): Set the default idle timeout
	to param.connect_timeout.
	* src/server/prot-a.c (prot_a_parse_packet): Set the idle timeout
	to param.login_timeout once the handshake is done.
	* src/server/connections.c (idle_cb): New static function.
	(login_request): Pass idle_cb() to isc_set_read_callback().
	* src/server/testsuite/lyskomd.0/37.exp: Expect the new timeval
	settings: "Connect timeout", "Login timeout" and "Active timeout".
	* src/server/testsuite/lyskomd.0/39.exp: New file, with tests for
	idle client disconnect.
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	39.exp.

	Fixed a race condition in the test suite.
	* src/server/testsuite/config/unix.exp (client_start_fail): Don't
	add an expect_always handler for eof.  In some tests two or more
	clients are supposed to die "at once", and this would lead to a
	race condition.
	(get_time_client_start): Ditto.

2345
2346
2347
2348
2349
	Test suite framework improvement.
	* src/server/testsuite/config/unix.exp (extracting_expect): Report
	the value that was found in the "pass" message.  This may help
	debugging.

2350
	Test suite: Made the "stalled client" test more robust.
2351
2352
2353
2354
2355
2356
	* src/server/testsuite/lyskomd.0/38.exp: Set the sync interval to
	1 day, to avoid spurious save async messages on slow hosts.  Don't
	change the timeout.  Keep waiting as long as the server processes
	new requests, even if it is so slow that it takes a long while for
	the output queue to start filling up.
	(req_rate): New proc.
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
	* src/server/testsuite/lyskomd.0/38.exp: Made the test for a
	stalled client more robust.
	(monitor_progress): Shut down the client if a timeout occurs.
	(send_queue_size): New proc.
	* src/server/testsuite/get-time-often.c (reading_from_server): New
	variable.
	(request_limit): New variable.
	(start_writing): New static function.
	(start_reading): Ditto.
	(stop_reading): Ditto.
	(read_stdin): New command: start-reading.
2368
2369
2370
	(read_server): If do_write_only, just return OOP_HALT when eof,
	EPIPE or ECONNRESET on the server is seen--don't print anything.
	Print a message if more than request_limit replies are received.
2371
2372
2373
2374
2375
2376
	(write_server): Made a log message unique.
	(main): Use start_reading(), start_writing() and stop_reading() to
	simplify the code.  Don't do a final write; different Unixes
	handles this in various strange ways, and we don't want to test
	*them*.

2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
	Test suite fix.
	* src/server/testsuite/lyskomd.0/38.exp: Use a small message size
	and transmit queue.

	Make the packet sizes and output queue parameters configurable.
	* doc/lyskomd.texi (Parameters): Document "Max client message
	size", "Max client transmit queue messages" and "Max client
	transmit queue bytes".
	* src/server/server-config.c (parameters): Renamed "Max client
	transmit queue" to "Max client transmit queue messages".  Added
	"Max client message size" and "Max client transmit queue bytes".
	* src/server/ramkomd.c (server_init): Call isc_cfg_queue_size().
	Actually *use* param.maxqueuedsize and param.maxdequeuelen.
	* src/server/param.h (struct param): Added maxmsgsize and
	maxqueuedsize_bytes.

2393
2394
2395
2396
2397
2398
2003-08-01  Per Cederqvist  <ceder@ceder.dyndns.org>

	get-stats should never return a negative number.
	* src/server/stats.c (check_one_stat): Fix the value if it has
	become negative, even if the error isn't large enough to fix.

2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2003-08-01  Per Cederqvist  <ceder@lysator.liu.se>

	Fix struct timeval overflow problems on Linux/Alpha.
	* src/libraries/libmisc/timeval-util.h,
	src/libraries/libmisc/timeval-util.c (timeval_ctor): Changed type
	of the sec argument from int to time_t.
	* src/server/testsuite/lyskomd.0/37.exp: Handle the %g format now
	created by timeval-overflow.
	* src/server/testsuite/timeval-overflow.c (main): Use %g instead
	of %f to print the numbers, to avoid overflow problems in the %f
	representation.

2411
2412
2003-08-01  Per Cederqvist  <ceder@ceder.dyndns.org>

2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
	More fixes to the test of stalled clients.
	* src/server/testsuite/get-time-often.c (main): Actually retry
	after a EAGAIN, EWOULDBLOCK or EINTR result from the final write.
	Retry if it succeeds as well -- the server may just be slow
	closing the socket.

	Collect statistics of the read and write queues.
	* doc/Protocol-A.texi (Measured Properties): Document
	send-queue-bytes and recv-queue-bytes.
	* src/server/stats.h (enum stat_type): Added STAT_SEND_QUEUE and
	STAT_RECV_QUEUE.
	* src/server/stats.c (name): Handle STAT_SEND_QUEUE and
	STAT_RECV_QUEUE.
	* src/server/ramkomd.c (write_queue_change_callback): New static
	function.  Update STAT_SEND_QUEUE.
	(server_init): Register write_queue_change_callback with isc.
	* src/server/internal-connections.c (kill_client): Update
	STAT_RECV_QUEUE.
	* src/server/connections.c (read_from_connection): Update
	STAT_RECV_QUEUE.
	* src/server/testsuite/lyskomd.0/01.exp: Test send-queue-bytes and
	recv-queue-bytes.
	* src/server/testsuite/lyskomd.0/03.exp: Ditto.
	* src/server/testsuite/lyskomd.0/38.exp: Ditto.

	Bug fix.
	* src/server/connections.c (toploop): Cancel the timer for
	check_kill_flag if needed during shutdown.

2442
2443
2444
2445
2446
2447
2448
	Don't be too efficient...  (Back out part of the "ignore clients"
	patch.)
	* src/server/connections.c (read_from_connection): Revert part of
	last change: flush the output even if the client is disconnecting.
	We want it to have a chance see the reply to the disconnect or
	shutdown request.

Per Cederqvist's avatar
Per Cederqvist committed
2449
2450
2451
2452
	Test suite fix.
	* src/server/testsuite/lyskomd.0/38.exp: Increased the timeout
	for stalled client detection even further.

2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
	Fixed a memory leak during shutdown.  Ignore clients that are
	being killed more efficiently.
	* src/server/connections.h (Connection): New field: kill_pending.
	* src/server/internal-connections.c (init_connection): Initialize
	kill_pending.
	(new_client): Ditto.
	* src/server/connections.c (add_to_kill_list): Check and update
	kill_pending.
	(check_kill_flg): Ditto.
	(read_from_connection): Ignore connections with a pending kill.
	(toploop): Call check_kill_flg() during shutdown if any kill is
	pending, so that the kill list is freed.

2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
	Test suite fixes.
	* src/server/testsuite/lyskomd.0/37.exp: Handle "Stale timeout".
	* src/server/testsuite/lyskomd.0/38.exp: Use --write-only without
	the --time-abort.  Use the new "shutdown" command of
	get-time-client.  Allow the server half a minute to fill the
	output queue for the --write-only test.
	* src/server/testsuite/config/unix.exp (client_start_fail): Don't
	call wait from expect_always code.  It would wait on the wrong
	process.
	(client_start_fail): Ditto.
	(get_time_client_start): Ditto.
	* src/server/testsuite/get-time-often.c (read_stdin): Implement
	the commands "ping" and "shutdown".
	(write_server): Don't return OOP_HALT just because the socket to
	the server is reset, but stop writing in that case.
	(main): Allow --write-only without --time-abort.  Retry the final
	write up to 3 times if it fails with EPIPE, ECONNRESET or EINTR.
Per Cederqvist's avatar
Per Cederqvist committed
2483
	(main): Write more than a single byte in the final write.
2484
2485
2486
2487
2488

	Xenofarm: ignore more warnings.
	* scripts/warnings.sed: Allow line numbers in floating point
	comparison warnings from mathinline.h to differ.

2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
	Disconnect stale clients.
	* doc/lyskomd.texi (Parameters): Document "Stale timeout".
	* src/server/server-config.c (parameters): Added "Stale timeout".
	* src/server/ramkomd.c (server_init): Configure the stale timeout
	of ISC.
	* src/server/param.h (struct kom_par): Added stale_timeout.
	* src/server/connections.c (stale_cb): New static function.
	(login_request): Pass stale_cb to isc_set_read_callback().
	(setup_timer): Moved to timeval-util.h, and added a return value.
	All callers updated to check it.
	* src/server/testsuite/lyskomd.0/38.exp: Set the "Stale timeout"
	to 10 seconds, so that we can test disconnection of a stalled
	client in a reasonable time.  Don't expect that test to fail.
	* src/server/testsuite/get-time-often.c (abort_pending): New
	static variable.
	(do_write_only): Now global static, not a local variable in main.
	(setup_timer): Removed.  Use the one from libmisc instead.
	(write_server): Handle ECONNRESET, EPIPE and end-of-file when only
	writing.
	(arm_timer): Check return value of setup_timer.
	(end_it): Clear abort_pending.
	(main): Set abort_pending if we are about to abort.  Cancel the
	timer if the top loop returns before the abort timer fires.
	Treat ECONNRESET the same way as EPIPE.

	Moved setup_timer() to libmisc.
	* src/server/connections.h: (setup_timer): Moved to
	timeval-util.h, and added a return value.  All callers updated to
	check it.
	* src/libraries/libmisc/timeval-util.h,
	src/libraries/libmisc/timeval-util.c (setup_timer): New function.
	* src/libraries/libmisc/Makefile.am (AM_CPPFLAGS): Search liboop.
	* src/server/text-garb.c (garb_callback): Check return value of
	setup_timer.

2524
2525
2003-07-31  Per Cederqvist  <ceder@ceder.dyndns.org>

2526
2527
2528
2529
2530
2531
2532
2533
2534
	Xenofarm tweak for asmodean.
	* scripts/xenofarm.sh: Close file descriptor 21 on asmodean.

	Don't access internal structures of isc.
	* src/server/connections.c (add_to_kill_list): Use the new
	isc_getoopsource() function instead of accessing the internals of
	the isc_mcb structure.
	(data_available_callback): Ditto.

2535
2536
2537
2538
2539
2540
2541
2542
2543
	Don't report expected rounding errors (near zero).
	* src/server/stats.c (struct avg_status): New field: max_seen.
	(dump_stats): Print the max_seen field.
	(init_stats): Initialize it.
	(update_history): Update it.
	(check_one_stat): Take max_seen into account when deciding if a
	message should be logged or not.  Reset max_seen if a new value is
	stored.

2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
	Test suite fix.
	* src/server/testsuite/lyskomd.0/38.exp: Handle the "Resource
	temporarily unavailable" error properly.

	Xenofarm: ignore more warnings.
	* scripts/warnings.sed: Ignore warnings from mathinline.h on
	Linux.

	Port to HP-UX 11.0.
	* src/server/Makefile.am (lyskomd_LDADD): Add -lm, which is needed
	for fpclassify on HP-UX 11.0.

2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
	Test handling of write-only clients.  They should be disconnected
	after a timeout, but that isn't implemented yet.
	* src/server/testsuite/lyskomd.0/38.exp: Test handling of a
	write-only client.  It should be disconnected after a while.
	* src/server/testsuite/config/unix.exp (get_time_client_start):
	Replaced the "mode" argument with an "args" argument, that is a
	list of arguments to pass to get-time-often.
	* src/server/testsuite/get-time-often.c (main): Implement
	--write-only.

2566
2567
2568
2569
	Don't round stats too often.
	* src/server/stats.c (check_one_stat): Fixed the logic that
	determines if we need to fix a rounding error.  Report the values
	using %g instead of %f.
2570
2571
2572
	(is_nonzero): New static function.
	(check_one_stat): Don't report very small rounding errors when the
	correct value is 0.
Per Cederqvist's avatar