ChangeLog 438 KB
Newer Older
1 2
2003-08-07  Per Cederqvist  <ceder@ceder.dyndns.org>

3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
	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.

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

28 29 30 31 32 33 34
	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.

35 36 37 38 39
	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.

40 41
2003-08-06  Per Cederqvist  <ceder@ceder.dyndns.org>

42 43 44 45 46
	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().

47 48 49 50 51
	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.

52 53 54 55 56 57 58
	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.

59 60 61
	Document undocumented TeX code.  (Bug 195).
	* doc/Protocol-A.texi: Document some TeX code.

62 63 64 65
	Fix the "make check" target in liboop.
	* src/libraries/liboop/test-oop.c (get_name): Adjusted the call to
	oop_adns_submit.

66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
	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.

91 92
2003-08-05  Per Cederqvist  <ceder@ceder.dyndns.org>

93 94 95 96 97 98
	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
99 100 101 102
	"make clean" fix.
	* src/server/testsuite/Makefile.am (MOSTLYCLEANFILES): Added 
	memory-usage-*.log.

103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
	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
	separately.
	* 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.

193 194
2003-08-04  Per Cederqvist  <ceder@ceder.dyndns.org>

195 196 197 198 199 200 201 202 203 204 205 206 207 208
	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.

209 210 211 212 213 214 215 216 217 218 219 220 221
	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.

222 223 224 225 226
	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.

227 228
2003-08-03  Per Cederqvist  <ceder@ceder.dyndns.org>

229 230 231 232 233 234 235 236 237 238
	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.

239 240 241 242 243 244
	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.

245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
	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.

266 267
2003-08-02  Per Cederqvist  <ceder@ceder.dyndns.org>

268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
	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.

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

307
	Test suite: Made the "stalled client" test more robust.
308 309 310 311 312 313
	* 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.
314 315 316 317 318 319 320 321 322 323 324
	* 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.
325 326 327
	(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.
328 329 330 331 332 333
	(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*.

334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349
	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.

350 351 352 353 354 355
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.

356 357 358 359 360 361 362 363 364 365 366 367
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.

368 369
2003-08-01  Per Cederqvist  <ceder@ceder.dyndns.org>

370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398
	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.

399 400 401 402 403 404 405
	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
406 407 408 409
	Test suite fix.
	* src/server/testsuite/lyskomd.0/38.exp: Increased the timeout
	for stalled client detection even further.

410 411 412 413 414 415 416 417 418 419 420 421 422
	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.

423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
	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
440
	(main): Write more than a single byte in the final write.
441 442 443 444 445

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

446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480
	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.

481 482
2003-07-31  Per Cederqvist  <ceder@ceder.dyndns.org>

483 484 485 486 487 488 489 490 491
	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.

492 493 494 495 496 497 498 499 500
	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.

501 502 503 504 505 506 507 508 509 510 511 512
	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.

513 514 515 516 517 518 519 520 521 522
	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.

523 524 525 526
	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.
527 528 529
	(is_nonzero): New static function.
	(check_one_stat): Don't report very small rounding errors when the
	correct value is 0.
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544

	Port to Solaris 2.4, which lacks snprintf.
	* configure.in: Check for snprintf.
	* src/server/prot-a-output.c (prot_a_output_float): Fall back to
	using sprintf if snprintf isn't available.

	Fix "pack" warnings in Xenofarm.
	* scripts/xenofarm.sh: When searching for a program, put the
	program in a subshell, so that we can reliably divert the "program
	not found" error message to stdout.  Use "find ... -print" instead
	of "find ... -ls", since -ls is a GNU extension.

	Xenofarm: ignore more warnings.
	* scripts/warnings.sed: Ignore some Solars warnings.

545 546 547 548 549 550 551 552
	Solaris stores ar in /usr/ccs/bin.
	* src/libraries/adns/configure.in: Use the same check for the
	``ar'' program that lyskom-server uses.

	Fix Xenofarm error.
	* scripts/xenofarm.sh: The log file from the "pack" task should be
	named "packwarn.txt", not "sherr.txt".

553 554
2003-07-30  Per Cederqvist  <ceder@ceder.dyndns.org>

555 556 557 558
	Fixed link error in test suite.
	* src/server/testsuite/Makefile.am (get_time_often_LDADD): Added
	libcheck.a, to get getopt_long().

559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586
	Improve test suite for busy clients.
	* src/server/Makefile.am (libcheck_a_SOURCES): Added getopt.c and
	getopt1.c.
	* src/server/testsuite/lyskomd.0/38.exp: Test two simultaneous
	get-time-client clients.
	(slow): Removed.
	(fast): Removed.
	(monitor_progress): New proc.
	* src/server/testsuite/get-time-often.c (last_progress_status):
	New variable.
	(parse_async): Fixed off-by-one parse error.  Report parse errors
	more verbosely.
	(report_progress): New function.  Report progress, but print
	nothing unless we have received a new reply from the server since
	the last time we were called.
	(longopts): New constant.
	(main): Use getopt_long to parse the arguments.  Enable progress
	report.  Fixed a broken printf format string.

	Don't crash if a client with queued request closes the
	connection.  Improve handling of busy clients.
	* src/server/connections.c (write_err_cb): Increase the penalty,
	so we don't process anything more from this client.
	(read_from_connection): isc_disable() can fail.  Handle that
	case.
	(check_idle_callback): Make sure the same connection is never
	processed more than once during a call to this function.

587 588 589 590 591 592 593 594 595 596 597 598 599 600
2003-07-30  Per Cederqvist  <ceder@lysator.liu.se>

	The statistics was broken on platforms where sizeof(int) !=
	sizeof(long).
	* src/server/stats.c (dump_stats): Updated to cope with the
	introduction of enum value_type.
	(ind): Changed sign of the "offset" argument, since it is a bad
	idea to store a negative number in an "unsigned int".  All callers
	updated.
	(update_one_stat): Fixed the call to check_stat when DEBUG_STATS
	is true.
	(check_one_stat): If a rounding error occurs, log which enum
	value_type that is responsible.

601 602
2003-07-28  Per Cederqvist  <ceder@ceder.dyndns.org>

Per Cederqvist's avatar
Per Cederqvist committed
603 604 605 606 607
	Fixed printf argument type.
	* src/server/testsuite/get-time-often.c (main): The argument to a
	"*" printf format string modifier should be an int, not an
	ssize_t.

608 609 610 611
	Revert last change to text-garb.c.  Fixed the libisc API instead.
	* src/server/text-garb.c: Don't include <sys/socket.h>.  isc.h no
	longer uses socklen_t in the exported API.

612 613 614 615 616 617 618 619 620 621 622 623 624 625 626
	Increase timeout during the stress test.
	* src/server/testsuite/lyskomd.0/38.exp: Use a very long timeout,
	but only for a short while.  Use client id 1, to avoid having to
	clients with id 0 if the first one doesn't die.
	(fast): New proc.
	(slow): New proc.

	Collect info about leaked memory even when valgrind isn't in use.
	* src/server/testsuite/config/unix.exp (memix): New variable.
	(check_memory_usage): Save the memroy-usage file if it indicates a
	leak.

	Don't log failure to write to a client that has closed the socket.
	* src/server/connections.c (write_err_cb): Don't log EPIPE errors.

627 628 629 630
	Include <sys/socket.h> before isc.h.
	* src/server/text-garb.c: Include <sys/socket.h>, since isc.h now
	needs it due to its use of socklen_t.

631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648
	Added the beginnings of a stress test.  This is work in progress,
	but it already seems to expose a server bug...
	* src/server/testsuite/lyskomd.0/38.exp: New test.
	* src/server/testsuite/config/unix.exp (client_death): Removed
	unneeded global statements for clientport, nl and deep_any.
	(get_time_client_start): New proc.
	(get_time_client_death): New proc.
	(talk_to): Handle get_time_client.
	* src/server/testsuite/get-time-often.c: New program, that
	generates a *lot* of get-time requests.
	* src/server/testsuite/Makefile.am (check_PROGRAMS): Added
	get-time-often.
	(get_time_often_SOURCES): New variable.
	(get_time_often_LDADD): New variable.
	(AM_CPPFLAGS): Make "oop.h" accessible.
	(.gdbinit): Added oop and isc directories.
	(EXTRA_DIST): Added 38.exp.

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
2003-07-27  Per Cederqvist  <ceder@ceder.dyndns.org>

	Measure statistics for the number of existing texts.
	* doc/Protocol-A.texi (Measured Properties): Document "texts".
	* src/server/stats.h (enum stat_type): Added STAT_TEXTS.
	* src/server/stats.c (name): Handle STAT_TEXTS.
	* src/server/text.c (do_delete_text): Update STAT_TEXTS.
	(do_create_text): Ditto.
	* src/server/simple-cache.c (init_cache): Call update_stat
	with STAT_TEXTS to updated the number of existing texts.
	* src/server/ramkomd.c (main): Moved the call to init_stats
	earlier, so that we can count the existing texts while reading the
	database.
	* src/server/testsuite/lyskomd.0/01.exp: Check the "texts" stat.
	* src/server/testsuite/lyskomd.0/03.exp: Ditto.

	Fix a potential denial-of-service scenario.
	* src/server/connections.c (login_request): Give the new client
	maximum penalty to start with.  It has to be connected a while to
	earn the right to do anything.

	Code cleanup.
	* src/server/simple-cache.c (init_cache): Use a new local
	variable, "record", to count the records in the database file.
	Don't reuse the "ic" variable for that purpose.  

675 676
2003-07-25  Per Cederqvist  <ceder@ceder.dyndns.org>

677 678 679 680 681 682 683
	Fixed "make check" for the documentation.
	* doc/constructs.expected: Added @code{printf("%g", val);}.
	* doc/checkargs.py (lexer.__init__): Added builtin type FLOAT.
	(lexer.pushback): Pushback @cite.
	* doc/Protocol-A.texi (Statistics): Fixed markup so that
	checkargs.py likes it.

684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737
	Changed 112=get_stats so that it returns average, ascent rate and
	descent rate for each measured value.  Return the values as FLOAT,
	not a fixed-point value stored in an INT32.
	* src/server/testsuite/lyskomd.0/01.exp: Updated for the new look
	of get-stats and the new members of enum stat_type.
	* src/server/testsuite/lyskomd.0/03.exp: Ditto.
	* src/server/testsuite/config/unix.exp (any_float): New constant. 
	* src/server/stats.h (enum stat_type): Removed STAT_FIRST_EVENT,
	STAT_PROCESSED_CALLS, STAT_PROCESSED_DNS, STAT_PROCESSED_IDENT,
	STAT_RUN_QUEUE_ENTER, STAT_RUN_QUEUE_LEAVE.  Added STAT_REQUESTS.
	* src/server/stats.c (enum value_type): New enum.
	(status): Added a new dimension: the type of the value (average,
	ascending rate, or descending rate.
	(copy): Ditto.
	(init_stats): Handle the new dimension.
	(update_one_stat): New static function, that updates a single
	dimension.
	(update_stat): Update the proper dimensions.
	(check_one_stat): New static function, that checks a single
	dimension.
	(check_stat): Check all dimensions.
	(name): Removed STAT_PROCESSED_CALLS, STAT_PROCESSED_DNS,
	STAT_PROCESSED_IDENT, STAT_RUN_QUEUE_ENTER, STAT_RUN_QUEUE_LEAVE.
	Added STAT_REQUESTS.
	(get_stats): Now returns a Stats_list.  Don't multiply the result
	by 100.
	* src/server/prot-a.c (prot_a_reply): Handle rt_stats_list.
	* src/server/prot-a-output.h (prot_a_output_stats_list): New
	function. 
	* src/server/prot-a-output.c (prot_a_output_float): New static
	function.
	(prot_a_output_stats): Ditto.
	(prot_a_output_stats_list): New function.
	* src/server/fncdef.txt: Changed return type of get_stats to
	Stats_list.
	* src/server/connections.h (enum res_type): Added rt_stats_list.
	(union result_holder): Added stats_list.
	* src/server/connections.c (queue_add): Don't update
	STAT_RUN_QUEUE_ENTER.
	(queue_remove): Don't update STAT_RUN_QUEUE_LEAVE.
	(parse_unparsed): Update STAT_REQUESTS instead of
	STAT_PROCESSED_CALLS.
	(get_host_name): Don't update STAT_PROCESSED_DNS.
	* src/include/services.h (get_stats): Changed return type to
	Stats_list.
	* src/include/kom-types.h (Stats): New struct.
	(Stats_list): New struct.
	* doc/Protocol-A.texi (Simple Data Types): New datatype: FLOAT.
	(Statistics): Added the "Stats" data type.
	Updated the description of the "when" field of
	"Stats-Description".
	(get-stats): Return an array of Stats, not INT32.
	(Measured Properties): There are no longer two kinds of values.

738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790
2003-07-24  Per Cederqvist  <ceder@ceder.dyndns.org>

	Implement 111=get_stats_description and 112=get_stats.
	* src/server/stats.h (check_all_stats): New name for former
	check_stat.
	* src/server/stats.c (check_stat): Only check a single
	statistics.  Now static.
	(check_all_stats): New name for former check_stat.  All callers
	updated.
	(name): New static function.
	(get_stats_description): New protocol request.
	(get_stats): New protocol request.
	* doc/lyskomd.texi (Parameters): Documented "Statistic name
	length".
	* src/server/server-config.c (parameters): Added "Statistic name
	length".
	* src/server/ramkomd.c (main): Use check_all_stats instead of
	check_stat.
	* src/server/prot-a.c (prot_a_reply): Handle rt_stats_description.
	* src/server/prot-a-output.h, src/server/prot-a-output.c
	(prot_a_output_stats_description): New function.
	* src/server/param.h (struct kom_par): Added stat_name_len.
	* src/server/fncdef.txt: Added 111=get_stats_description and
	112=get_stats.
	* src/server/connections.h (enum res_type): Added
	rt_stats_description.
	(union result_holder): Added stats_description.
	* src/include/services.h (get_stats_description): New request.
	(get_stats): New request.
	* src/include/kom-types.h (Stats_description): New data type.
	* src/include/kom-errno.h (enum kom_err): Added
	KOM_UNDEFINED_MEASUREMENT.
	* doc/constructs.expected: Added @code{when} and @samp{X-}.
	* doc/Protocol-A.texi (Statistics): New section.
	(get-stats-description): New request.
	(get-stats): New request.
	(Error Codes): Documented undefined-measurement.
	(Measured Properties): New chapter.
	* src/server/testsuite/lyskomd.0/01.exp: Test
	get-stats-description and get-stats.
	* src/server/testsuite/lyskomd.0/03.exp: Ditto.

	Collect more statistics.
	* src/server/rfc931.c (get_real_username): Update the
	STAT_IDENT_QUEUE and STAT_PROCESSED_IDENT statistics.
	* src/server/stats.h (enum stat_type): Added STAT_DNS_QUEUE,
	STAT_IDENT_QUEUE, STAT_PROCESSED_DNS and STAT_PROCESSED_IDENT.
	* src/server/connections.c (logout_client): Update the
	STAT_CLIENTS statistics.
	(login_request): Ditto.
	(get_host_name): Update the STAT_DNS_QUEUE and STAT_PROCESSED_DNS
	statistics.

791 792
2003-07-23  Per Cederqvist  <ceder@ceder.dyndns.org>

793 794 795 796
	Fixed the overflow checking of timeval configuration parameters.
	* src/server/conf-file.c (assign_timeval): The logic for detecting
	overflow was wrong.

797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812
	Code cleanup.
	* src/server/aux-item-def-parse.y: Don't include <string.h>
	twice.

	Gather statistics on the run queue length and the number of
	processed requests.
	* src/server/Makefile.am (lyskomd_SOURCES): Added stats.h and
	stats.c.
	* src/server/stats.h, src/server/stats.c: New file, that collects
	some statistical information about the operation of the server.
	* src/server/ramkomd.c (main): Initialize the statistics
	subsystem, and check the integrity of it during shutdown.
	* src/server/connections.c (queue_add): Update statistics.
	(queue_remove): Ditto.
	(parse_unparsed): Ditto.

813 814
2003-07-22  Per Cederqvist  <ceder@ceder.dyndns.org>

815 816 817 818 819 820 821
	Don't redefine LIST_INIT on FreeBSD 4.8.
	* src/libraries/adns/src/dlist.h (ADNS_LIST_INIT, ADNS_LINK_INIT)
	(ADNS_LIST_UNLINK_PART, ADNS_LIST_LINK_TAIL_PART, ADNS_LIST_UNLINK)
	(ADNS_LIST_LINK_TAIL): Appended the "ADNS_" prefix to make the
	macro names more unique.  LIST_INIT is already defined in
	/usr/include/sys/queue.h:291 on FreeBSD 4.8.  All users updated.

822 823 824 825 826 827 828 829 830 831 832 833
	Added overflow checking of timeval configuration parameters, and
	test cases for the error checking.
	* src/server/conf-file.c (assign_timeval): Added overflow checking.
	* src/server/testsuite/lyskomd.0/37.exp: Check for overflow, bad
	suffixes, and negative values for time parameters.
	* src/server/testsuite/timeval-overflow.c: New program that
	creates a broken lyskomd config file with timeval overflows.
	* src/server/testsuite/Makefile.am (check_PROGRAMS): Added
	timeval-overflow.
	(timeval_overflow_SOURCES): New target.
	(check-lyskomd): Depend on timeval-overflow.

834 835
2003-07-18  Per Cederqvist  <ceder@ceder.dyndns.org>

836 837 838 839 840 841 842 843 844 845 846 847 848
	Find the included adns.h from liboop.
	* src/libraries/liboop/Makefile.am (AM_CPPFLAGS): Added -I option
	for adns.

	Fix enum mis-match detected by the AIX 5.1 compiler.
	* src/libraries/adns/src/parse.c (adns__parse_domain): The flags
	argument should be a parsedomain_flags, not adns_queryflags.  I
	think.

	Port adns to FreeBSD (and many others).
	* src/libraries/adns/configure.in: Include <sys/types.h> before
	<sys/select.h>.

Per Cederqvist's avatar
Per Cederqvist committed
849 850 851 852
	Xenofarm improvements.
	* scripts/xenofarm.sh: Save config.log and config.h from the adns
	library.

853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899
	Link lyskom-server against adns.
	* configure.in: Added src/libraries/adns to AC_CONFIG_SUBDIRS.
	* mkmi: Recreate configure and Makefile.in in adns.
	* src/libraries/Makefile.am (SUBDIRS): Added adns.
	* src/libraries/liboop/configure.ac: Unconditionally define
	HAVE_ADNS.
	* src/libraries/liboop/Makefile.am (liboop_a_SOURCES): Added
	adns.c.
	(test_oop_LDADD): Added libadns.a.
	* src/server/Makefile.am (AM_CPPFLAGS): Include adns files.
	(lyskomd_LDADD): Link with libadns.a.

	Removed adns files that are generated by autoconf or automake.
	* src/libraries/adns/Makefile.in: Removed.
	* src/libraries/adns/acconfig.h: Removed.
	* src/libraries/adns/aclocal.m4: Removed.
	* src/libraries/adns/configure: Removed.
	* src/libraries/adns/src/Makefile.in: Removed.
	* src/libraries/adns/src/config.h.in: Removed.
	* src/libraries/adns/src/.cvsignore: Added more files to ignore.
	* src/libraries/adns/.cvsignore: Added more files to ignore.

	Use Automake in adns for better integration with lyskoms-server.
	Only re-implement what we need (no shared libraries, no programs,
	no testsuite...)
	* src/libraries/adns/configure.in: Updated for automake-1.5.1 and
	autoconf-2.57.  Removed DPKG_CACHED_TRY_COMPILE.  Removed all
	dynamic linking support.  Removed support for client programs.
	Use AC_C_INLINE instead of a hand-coded test for the same thing.
	Add AH_VERBATIM for config.h.  Only output Makefile and
	src/Makefile.
	* src/libraries/adns/acinclude.m4: New name for former
	aclocal.m4.
	* src/libraries/adns/Makefile.am: New Makefile template, which
	compiles (and distributes) only the parts of adns that are needed
	by the LysKOM server.
	* src/libraries/adns/src/Makefile.am: Ditto.
	* src/libraries/adns/settings.make.in: Removed.  Use automake
	instead.

	Import adns-1.0.
	* src/libraries/adns/README: Mention where the lyskom-server
	ChangeLog can be found.  Mention that only parts of the full adns
	distribution is included here.
	* src/libraries/adns/changelog: Ditto.
	* src/libraries/adns: Imported adns-1.0.

900 901
2003-07-16  Per Cederqvist  <ceder@ceder.dyndns.org>

902 903 904 905 906 907 908 909 910
	Xenofarm: ignore more warnings.
	* scripts/xenofarm.sh (makewarn): Remove spurious warnings from
	fonda.roxen.com.
	* scripts/warnings.sed: More updates.

	Fixed all calls to isspace().
	* src/server/conf-file.c (assign_timeval): Fixed the type of the
	argument to isspace().

911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928
	<malloc.h> is obsolete and produces a warning on FreeBSD 4.8.
	Avoid including it.
	* src/server/aux-item-def-parse.y: Include <stdlib.h> instead of
	<malloc.h>.
	* src/server/admin.c: Don't needlessly include <malloc.h>.
	* src/server/debug.c: Include <malloc.h> only if we really need
	it; we must be configured with --with-debug-calls and mallinfo()
	must be found.

	Second attempt to get rid of warnings about bzero().
	* src/libraries/liboop/configure.ac: Check for <strings.h>.
	* src/libraries/liboop/adns.c: Include <strings.h> to get rid of a
	warning on AIX 4.3.
	* src/libraries/liboop/glib.c: Ditto.
	* src/libraries/liboop/select.c: Ditto.
	* src/libraries/liboop/sys.c: Ditto.
	* scripts/warnings.sed: More updates.

929 930
2003-07-15  Per Cederqvist  <ceder@ceder.dyndns.org>

931 932 933 934 935 936 937 938 939 940 941 942
	Fix some portability issues in liboop.
	* src/libraries/liboop/read.c: Undefine MIN before defining it.
	* src/libraries/liboop/configure.ac: Check for <string.h>.
	* src/libraries/liboop/adns.c: Include <string.h> to get rid of a
	warning on AIX 4.3.
	* src/libraries/liboop/glib.c: Ditto.
	* src/libraries/liboop/select.c: Ditto.
	* src/libraries/liboop/sys.c: Ditto.

	Update the warnings filter.
	* scripts/warnings.sed: Updated.

943 944 945 946
	Reduce the number of false warnings from Xenofarm.
	* scripts/xenofarm.sh: Don't produce output on stderr when
	checking for the existence of certain programs.

947 948 949 950 951 952 953
	Liboop integration.
	* AUTHORS: Add info about liboop.

	Build warnings in Xenofarm were broken.  Added a warning if the
	xenofarm script produces any output to stderr.
	* scripts/warnings.sed: Added a missing "d".
	* scripts/xenofarm.sh: Store the stderr output generated during
954
	the build in a separate file.  Introduce a final "pack" task that
955 956 957 958
	will result in a warning if any output to stderr exists.  Enable
	core files.  Recognize core files even when the file name includes
	a pid.  Store the config.log file from liboop.

959 960
2003-07-14  Per Cederqvist  <ceder@ceder.dyndns.org>

961 962 963 964
	Fixed a recently introduced typo.
	* src/server/connections.c (queue_remove): Fixed a typo that
	caused a broken pointer structure on the queue of pending clients.

965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982
	Improve liboop error checking.
	* src/libraries/liboop/signal.c (add_flag): New static function,
	that checks the return values from fcntl properly.
	(oop_signal_new): Use add_flag() to simplify code. Fail (return
	NULL) if any of the fcntl calls on the new pipe fails.

	Increase PROTECTED_FDS, since liboop uses internal file
	descriptors.
	* src/include/kom-config.h (PROTECTED_FDS): Increased from 12 to
	20.  Document that liboop uses a couple of file descriptors, and
	that this setting is also present in unix.exp.
	* src/server/testsuite/config/unix.exp (PROTECTED_FDS): New
	constant.
	* src/server/testsuite/lyskomd.0/07.exp: Use PROTECTED_FDS.
	* src/server/testsuite/lyskomd.0/connections-cov.exp: Ditto.
	* src/server/testsuite/lyskomd.0/prot-a-send-async-cov.exp: Ditto.
	* src/server/testsuite/lyskomd.0/send-async-cov.exp: Ditto.

983 984 985 986 987 988 989 990 991 992 993
	Flush the output less often.  This fixes the non-controversial
	parts of bug 107.
	* src/server/prot-a.c (prot_a_reply): Don't call isc_flush()
	here.  Doing so was redundant.
	* src/server/connections.c (parse_unparsed): Return true if
	anything was sent back to the client.  Don't call isc_flush().
	(read_from_connection): Call isc_flush() once if parse_unparsed()
	returned true at least once.
	* src/server/prot-a-send-async.c (async_trailer): Added a
	comment about the controversial parts of bug 107.

994 995
2003-07-13  Per Cederqvist  <ceder@ceder.dyndns.org>

996 997 998 999 1000 1001 1002
	Don't call select() with a very large timeout.  This could
	possibly fix bug 1065.
	* src/libraries/liboop/sys.c (oop_sys_run): Clamp the value of the
	tv_sec field of the select timeout argument to 3600 seconds, to
	check if very large values is the reason that FreeBSD returns
	EINVAL here.  (Bug 1065).

1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021
	Reverted the change of 1999-04-03: go_and_die is now a Bool once
	again.  It is no longer manipulated from a signal handler.
	* src/server/admin.c (shutdown_kom): Use TRUE instead of 1 as
	value of go_and_die.
	* src/server/connections.c (go_and_die): Now a Bool, once again.
	* src/server/ramkomd.c (sighandler_hup): Use TRUE instead of 1 as
	value of go_and_die.
	* src/server/sigflags.h (go_and_die): Now a Bool, once again.

	Terminate at once if go_and_die becomes set while the queue of
	pending requests is processed.
	* src/server/connections.c (check_idle_callback): Break out of the
	loop and return OOP_HALT if go_and_die is true.

	Header file cleanup.
	* src/server/sigflags.h (intr_syscalls_on_intr): Removed.
	(restart_syscalls_on_intr): Removed.
	(do_statistics): Removed.

1022 1023 1024 1025 1026 1027
2003-07-13  Per Cederqvist  <ceder@lysator.liu.se>

	Actually distribute all test cases...
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	37.exp.

1028 1029
2003-07-13  Per Cederqvist  <ceder@ceder.dyndns.org>

1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076
	Tweak testsuite timeouts.
	* src/server/testsuite/config/unix.exp (timeout): Increase the
	timeout 2 more seconds.

	Move garb timers around so that the debug request start_garb() can
	actually start the garb.  Fixes breakage in lyskomd.0/09.exp.
	* src/server/text-garb.h (garb_text): This function is now
	static.
	(start_garb_thread): New function.
	(stop_garb_thread): New function.
	* src/server/text-garb.c (garb_timer): New static variable.
	(garb_timer_running): Ditto.
	(garb_text): Added static qualifier.
	(garb_callback): Moved here from connections.c.  Some minor
	modifications made to make it compiler in its new environment.
	(start_garb_thread): New function.
	(stop_garb_thread): New function.
	(start_garb): Restart the garb "thread".
	* src/server/connections.h (set_time): Now exported.
	(setup_timer): Ditto.
	(server_idle): New function.
	* src/server/connections.c (set_time): No longer static.
	(setup_timer): Ditto.
	(garb_callback): Moved to text-garb.c. 
	(saver_callback): The source argument is actually used.
	(toploop): Moved the garb timer to text-garb.c.
	(server_idle): New function.

	Use the liboop signal adapter; avoid using siglongjmp from signal
	handlers.  Ignore signals during shutdown.
	* src/server/ramkomd.c (kom_signal_adapter): New static variable.
	(server_init): Use oop_signal_new, since I don't trust the way
	liboop uses siglongjmp to break out of a signal handler.  Ignore
	the signals before registering them with liboop, to get a proper
	behaviour on shutdown.
	(main): Adjusted to use the signal adapter.

	Fix errors in ths liboop signal adapter.
	* src/libraries/liboop/signal.c (use_sa_restart): New static
	variable.
	(sig_on_signal): Add SA_RESTART if appropriate.
	(oop_signal_new): Don't just blindly set FD_CLOEXEC and
	O_NONBLOCK.  Read the old settings first.
	(oop_signal_use_sa_restart): New function.
	* src/libraries/liboop/oop.h (oop_signal_use_sa_restart): New
	function.

1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098
	Updated documentation for the configuration file for "timeval"
	parameters and penalty points/client scheduling.
	* doc/lyskomd.texi (Parameter Types): Document "timeval".
	(Parameters): Updated the documentation for "timeval" parameters
	and the parameters relating to penalty points.

	Added test cases for parsing of timeval values.
	* src/include/services.h (dump_cfg_timevals): New debug request.
	* src/server/fncdef.txt: Added 1006=dump_cfg_timevals.
	* src/server/server-config.c (dump_timeval): New static function.
	(dump_cfg_timevals): New request.
	* src/server/testsuite/lyskomd.0/37.exp: New file: Test the
	parsing of "timeval" entries in the configuration file.

	Improved timeval parsing.
	* src/server/conf-file.c (assign_timeval): Skip whitespace between
	the number and the suffix.  Round the tv_usec field properly.

	Improve config file checking.
	* src/server/server-config.c (read_configuration): Give an error
	message if low_penalty isn't lower than max_penalty.

1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110
	Fixed more compilation errors.
	* src/server/simple-cache.c (cache_sync_finish): Added a missing
	parenthesis.
	* src/server/aux-item-def-parse.y: Include timewrap.h, since
	connections.h now needs it.
	* src/server/debug.c: Ditto.
	* src/server/standalone.c: Ditto.

	Added more liboop assertions.
	* src/libraries/liboop/sys.c (oop_sys_run): Added a few assertions
	to try to figure out why select still returns EINVAL sometimes.

1111 1112 1113 1114
	Fixed compilation error when compiled for coverage measurements.
	* src/server/simple-cache.c (cache_sync_finish): Adjusted to new
	API of sync_part().

1115
	Include <time.h> and <sys/time.h> in a proper way.
1116
	* src/server/Makefile.am (lyskomd_SOURCES): Added timewrap.h.
1117 1118 1119 1120
	* src/server/timewrap.h: New include file; a wrapper around
	<time.h> and <sys/time.h>.  All files that needs to include either
	file now does so via this wrapper.

1121 1122
2003-07-12  Per Cederqvist  <ceder@ceder.dyndns.org>

Per Cederqvist's avatar
Per Cederqvist committed
1123 1124 1125 1126
	Code cleanup.
	* src/server/server-config.c: (parameters): Added default_suffix
	initializers for all parameters.  Break overly long lines.

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 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221
	All configuration parameters that are time periods can now have an
	optional suffix such as "hours" appended.  Store them as a struct
	timeval, not as an int, so that the bulk of the code doesn't have
	to take the unit into account.
	* src/server/param.h (struct kom_par): Changed the type of the
	following fields from int to struct timeval:
	garb_busy_postponement, garbtimeout, synctimeout, garb_interval,
	sync_interval, sync_retry_interval.
	* src/server/server-config.c: (parameters): Changed the assigner
	of "Garb busy postponement", "Garb timeout", "Sync timeout", "Garb
	interval", "Sync interval" and "Sync retry interval" from int to
	timeval, and added appropriate default suffixes to those
	configuration parameters.
	* src/server/conf-file.h (struct parameter): New field:
	default_suffix.
	(assign_timeval): New assigner.
	* src/server/conf-file.c (struct suffix_conversion): New struct.
	(suffix_table): New table.
	(assign_timeval): New assigner.

	Use "struct timeval" instead of a number of milliseconds or
	seconds in several places.  This fixes a number of potential and
	actual overflows.
	* src/server/connections.h (Connection): Change the type of the
	session_start and active_time fields from time_t to struct
	timeval.
	* src/server/server-time.h (current_time): Now a struct timeval,
	not a time_t.
	* src/server/disk-end-of-atomic.c, src/server/end-of-atomic.h
	(end_of_atomic): Now returns a struct timeval, not a long.
	* src/server/cache.h (sync_part): Now returns a struct timeval.
	* src/server/text.c (add_text_in_conf): Extract the
	seconds from the current_time.
	(create_text_add_miscs): Ditto.
	(do_create_text): Ditto.
	(add_recipient): Ditto.
	(add_comment): Ditto.
	(add_footnote): Ditto.
	* src/server/text-garb.c (garb_text): Extract the seconds from the
	current_time.
	* src/server/simple-cache.c (sync_output_header): Extract the
	seconds from the current_time.
	(sync_part): Return a struct timeval instead of a long.  Use 
	struct timeval instead of a time_t.  Use timeval_remaining() to
	simplify the code.
	(init_cache): Use a struct timeval instead of time_t.
	(cache_sync_all): Adjusted to new API of sync_part().
	* src/server/session.c (leave_conf): Extract the seconds from the
	current_time.
	(login_old): Ditto.
	(login): Ditto.
	(get_static_session_info): Ditto.
	(get_time): Ditto.
	(logout): Ditto.  Use timeval_diff_sec instead of ldifftime.
	(who_is_on_dynamic): Use timeval_diff_sec instead of ldifftime.
	(get_session_info): Ditto.
	(get_session_info_ident): Ditto.
	* src/server/send-async.c (async_rejected_connection): Use struct
	timeval instead of time_t.
	* src/server/ramkomd.c (current_time): Now a struct timeval, not
	a time_t.
	(main): Adjusted for the new type of current_time.
	* src/server/person.c (create_person_generic): Extract the seconds
	from the current_time.
	* src/server/membership.c (do_add_rec_time): Extract the seconds
	from the current_time.
	(do_add_member): Ditto.
	* src/server/internal-connections.c (init_connection): Use struct
	timeval instead of time_t.
	* src/server/connections.c (set_time): Use struct timeval instead
	of time_t.
	(dump_statistics): Ditto.
	(saver_callback): Ditto.
	(setup_timer): Replaced the milliseconds argument with a struct
	timeval argument.
	(garb_callback): Simplified the code.
	* src/server/conference.c (do_create_conf): Extract the seconds
	from the current_time.
	* src/server/aux-items.c (prepare_aux_item): Extract the seconds
	from the current_time.

	Added utility functions for struct timeval.
	* src/libraries/libmisc/Makefile.am (libmisc_a_SOURCES): Added
	timeval-util.h and timeval-util.c.
	* src/libraries/libmisc/timeval-util.h,
	* src/libraries/libmisc/timeval-util.c: New files.
	(timeval_subtract): New static function.
	(timeval_nonzero): New function.
	(timeval_zero): Ditto.
	(timeval_ctor): Ditto.
	(timeval_remaining): Ditto.
	(timeval_greater): Ditto.
	(timeval_less): Ditto.
	(timeval_diff_sec): Ditto.

1222 1223 1224 1225
	Don't store garbage in struct timevals passed to liboop.
	* src/server/connections.c (setup_timer): Fixed an error that
	caused the tv_usec field to be out-of-range.

1226 1227 1228 1229 1230 1231 1232 1233 1234
2003-07-12  Per Cederqvist  <ceder@lysator.liu.se>

	Make liboop refuse bad timestamps early on.
	* src/libraries/liboop/sys.c (sys_on_time): Trigger an assertion
	if a broken tv_usec is entered.

	Make gdb find the liboop sources.
	* src/server/Makefile.am (.gdbinit): Added liboop.

1235 1236
2003-07-12  Per Cederqvist  <ceder@ceder.dyndns.org>

1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259
	Attempt to fix a bug that caused the testsuite to hang.
	* src/server/testsuite/config/unix.exp (kill_client): Fixed broken
	logic that caused the "looking for stray output" never to emit a
	pass message.  Look for eof on the client.

	Update valgrind suppressions.
	* src/server/testsuite/lyskomd.supp: Track the name change of
	isc_tcp_accept_fn() to isc_tcp_accept().

	Reduce the number of log messages.
	* src/server/connections.c (add_to_kill_list): Don't write a log
	message when the connection is already present on the kill list.
	With the liboop callbacks that can happen and is not an error.
	(write_err_cb): Don't log an error for ECONNRESET.

	Fixed compilation errors.
	* src/server/connections.c (read_from_connection): Removed
	left-over debug code.
	(enable_idle_check): Ditto.
	(check_idle_callback): Ditto.
	* src/libraries/liboop/www.c (reg): Don't use //-style comments.
	(unreg): Ditto.

1260 1261 1262 1263 1264
	Fixed liboop compilation errors introduced by me.
	* src/libraries/liboop/sys.c (sys_on_time): Moved the assert
	statement to after all variable declarations.
	(sys_on_signal): Ditto.

1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 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 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417
	Make it easier to run all the tests that don't require dejagnu.
	* src/server/testsuite/Makefile.am (check-nondejagnu): New target.
	(check-dejagnu): New target.
	(check): Depend on check-dejagnu and check-nondejagnu, and move
	all dependencies to one of those targets.

	Add scheduling of clients, so that one client cannot starve other
	clients for resources.  (Bug 102).
	* src/server/server-config.c (parameters): Added "Penalty per
	call", "Penalty per read", "Max penalty" and "Low penalty".
	* src/server/testsuite/lyskomd.0/conf-file-cov.exp: Check the
	parameter "Garb timeout" instead of "Idle timeout", since the
	latter no longer exists.
	* src/server/param.h (struct kom_par): Removed timeout.  Added
	garb_busy_postponement, penalty_per_call, penalty_per_read,
	max_penalty and low_penalty.
	* src/server/internal-connections.c (init_connection): 
	Initialize penalty, penalty_generation, queue_next, queue_prev,
	on_queue.
	(kill_client): Assert that on_queue is false.
	* src/server/connections.h (Connection): New fields: penalty,
	penalty_generation, queue_prev, queue_next, on_queue.
	(handle_accept_event): New function.
	* src/server/connections.c (penalty_generation): New static variable.
	(work_done): Ditto.
	(is_idle): Ditto.
	(queue_first): Ditto.
	(queue_last): Ditto.
	(queue_add): New static function.
	(queue_remove): Ditto.
	(logout_client): Remove the client from the queue of pending
	clients.
	(parse_unparsed): Add penalty points for finished calls and
	protocol errors.  Don't delete the parsed part of unparsed.
	(adjust_penalty): New static function.
	(enable_idle_check): Ditto.
	(check_idle_callback): Ditto.

	Run the database save, garb, and check for killed clients from
	three separate liboop timer callbacks.
	* src/server/connections.c (kill_pending): New static variable.
	(add_to_kill_list): Add an oop timer event callback to
	check_kill_flg when a client is added to the kill list.
	(check_kill_flg): Changed API: this is now an oop timer callback
	function.
	(garb_callback): New static function.
	(saver_callback): Ditto.
	* src/server/text-garb.c (last_start): Static variable removed.
	(garb_text): Expect the caller to wait long enough when the garb
	shouldn't be running.  Return true when the garb is completed,
	instead of when the garb shouldn't be running.
	* src/server/cache.h (sync_part): Return the number of seconds to
	wait instead of a Bool.
	* src/server/simple-cache.c (sync_part): Return the number of
	seconds to wait instead of a Bool.  All callers updated.
	* src/server/server-config.c (parameters): Removed "Idle timeout".
	Added "Garb busy postponement"
	* src/server/end-of-atomic.h (end_of_atomic): Removed the
	idle argument.
	* src/server/disk-end-of-atomic.c (end_of_atomic): Removed the
	idle argument.  Don't call the garb.  Adjusted to the new API of
	sync_part().

	Use liboop for signal dispatching.
	* src/server/ramkomd.c (sighandler_usr1): Now an liboop signal
	callback, not a real signal handler.  Do the real work here.
	(sighandler_winch): Ditto.
	(sighandler_hup): Now an liboop signal callback, not a real signal
	handler.
	(sighandler_quit): Ditto.
	(sighandler_usr2): Ditto.
	(setup_sighandlers): Removed.
	(restart_syscalls_on_intr): Removed.
	(intr_syscalls_on_intr): Removed.
	* src/server/param.h (reread_param): Variable removed.
	* src/server/server-config.c (reread_param): Removed.
	* src/server/connections.c (do_statistics): Variable removed.

	Use liboop.  (Bug 106).
	* src/server/Makefile.am (AM_CPPFLAGS): Added an -I flag for
	liboop.
	(lyskomd_SOURCES): Added oop-malloc.h and oop-malloc.c.
	(lyskomd_LDADD): Link against liboop.a.
	* src/server/oop-malloc.c, src/server/oop-malloc.h
	(oop_malloc_wrapper): New function.
	(oop_free_wrapper): New function.
	(oop_realloc_wrapper): New function.
	(dump_oop_alloc_counts): New function.
	* src/server/ramkomd.c (listen_client): Static variable removed.
	(server_init): Initialize liboop.  Adjusted to the new isc API:s.
	(main): Clean up liboop structures on shutdown.
	* src/server/rfc931.h: Adjusted to new libisc API.
	* src/server/rfc931.c: Include liboop.h.
	* src/server/prot-a.c: Include oop.h.
	* src/server/prot-a-send-async.c: Include oop.h.
	* src/server/prot-a-parse.c: Include oop.h.
	* src/server/prot-a-parse-arg-c.awk: Include oop.h.
	* src/server/prot-a-output.c: Include oop.h.
	* src/server/isc-interface.h (kom_server_oop_src): New global
	variable.
	* src/server/connections.c (kom_server_oop_src): New variable.
	(set_time): New static function.
	(parse_message): Function removed.
	(logout_request): Function removed.
	(parse_forgotten): Ditto.
	(message_request): Ditto.
	(write_err_cb): New static function.
	(read_from_connection): Ditto.
	(setup_timer): Ditto.
	(data_available_callback): Ditto.
	(handle_accept_event): New function.
	(login_request): Take an isc_scb as argument instead of an isc
	event.  Add read and write error callback functions for the new
	client.
	(toploop): Rewritten to use liboop.

	Code cleanup.
	* src/server/internal-connections.c (init_connection): Added
	static const qualifiers to the default_want_async variable.

	Renamed a few constants that have nothing to do with ISC.
	* src/server/isc-parse.h (KOM_PROTOCOL_ERR): New name for former
	ISC_PROTOCOL_ERR.  All users updated.
	(KOM_MSG_INCOMPLETE): New name for former ISC_MSG_INCOMPLETE.  All
	users updated.
	(KOM_LOGOUT): New name for former ISC_LOGOUT.  All users updated.
	* src/server/isc-parse.c (parse_char): Use KOM_MSG_INCOMPLETE
	instead of ISC_MSG_INCOMPLETE.

	Make it possible to read an unsigned int from the config file.
	* src/server/conf-file.h (assign_uint): New function.
	(union param_value): Unused union removed.
	* src/server/conf-file.c (assign_uint): New function.

	Add SA_RESTART support to liboop.  (This has been sent to the
	liboop maintainer.)  (Fixes bug 845).
	* src/libraries/liboop/oop.h (oop_sys_use_sa_restart): New
	function.
	* src/libraries/liboop/sys.c (sys_sig_owner): Added static
	qualifier.
	(use_sa_restart): New static variable.
	(sys_on_fd): Require the callback to be non-NULL.
	(sys_on_time): Ditto.	
	(sys_on_signal): Ditto.	
	(sys_on_signal): Use SA_RESTART if use_sa_restart is true.
	(oop_sys_use_sa_restart): New function.

	Add a few utility string functions.
	* src/libraries/libmisc/s-string.h,
	src/libraries/libmisc/s-string.c (s_trim_left): New function.
	(s_reserve): New function.
	(s_reserve_done): New function.

1418 1419 1420 1421 1422 1423 1424 1425 1426 1427
2003-07-10  Per Cederqvist  <ceder@ceder.dyndns.org>

	Solaris stores ar in /usr/ccs/bin.
	* src/libraries/liboop/configure.ac: Use the same check for the
	``ar'' program that lyskom-server uses.

	libisc will soon depend on liboop.
	* src/libraries/Makefile.am (SUBDIRS): Compile liboop before
	libisc-new, since isc is about to use liboop.

1428 1429
2003-07-09  Per Cederqvist  <ceder@ceder.dyndns.org>

1430 1431 1432 1433
	Link-time fix for liboop test program.
	* src/libraries/liboop/Makefile.am (test_oop_LDADD): Link against
	liboop.a, not -loop, to ensure that we get the local copy.

1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 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
	Build liboop (but don't use it yet).
	* configure.in: Added src/libraries/liboop to AC_CONFIG_SUBDIRS.
	* mkmi: Recreate configure and Makefile.in in liboop.
	* src/libraries/Makefile.am (SUBDIRS): Added liboop.

	Using libtool isn't worth the effort for our copy of liboop.
	Don't include adapters for things we are never going to use.
	* src/libraries/liboop/configure.ac: Removed checks for readline,
	glib, Tcl and libwww, since they are not used by lyskom-server.
	(AM_PROG_LIBTOOL): Removed.
	(PROG_LDCONFIG): Don't set it.
	(no_wacky_libs): Don't set it.
	(AC_PROG_RANLIB): Added.
	* src/libraries/liboop/Makefile.am (noinst_LIBRARIES): Added.
	(liboop_a_SOURCES): New name for former liboop_la_SOURCES.
	(noinst_HEADERS): New name for former include_HEADERS.
	(lib_LTLIBRARIES): Removed.
	(liboop_la_LDFLAGS): Removed.
	(liboop_adns_la_LDFLAGS): Removed.
	(liboop_adns_la_LIBADD): Removed.
	(liboop_adns_la_SOURCES): Removed.
	(liboop_glib_la_LDFLAGS): Removed.
	(liboop_glib_la_LIBADD): Removed.
	(liboop_glib_la_SOURCES): Removed.
	(liboop_tcl_la_LDFLAGS): Removed.
	(liboop_tcl_la_LIBADD): Removed.
	(liboop_tcl_la_SOURCES): Removed.
	(liboop_www_la_LDFLAGS): Removed.
	(liboop_www_la_LIBADD): Removed.
	(liboop_www_la_SOURCES): Removed.
	(liboop_rl_la_LDFLAGS): Removed.
	(liboop_rl_la_LIBADD): Removed.
	(liboop_rl_la_SOURCES): Removed.
	(check_PROGRAMS): New name for former noinst_PROGRAMS.
	(test_oop_LDADD): Removed $(lib_LTLIBRARIES) and added -loop.
	(install-exec-local): Removed.  There is no need to run ldconfig.

	Removed liboop files that are generated by autoconf or automake.
	* src/libraries/liboop/aclocal.m4: Removed.
	* src/libraries/liboop/Makefile.in: Removed.
	* src/libraries/liboop/configure: Removed.
	* src/libraries/liboop/install-sh: Removed.
	* src/libraries/liboop/missing: Removed.
	* src/libraries/liboop/mkinstalldirs: Removed.

	Import liboop-0.9.
	* src/libraries/liboop/README: File created.
	* src/libraries/liboop/*: Import version 0.9 of liboop to the
	lyskom-server repository.

1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496
	Liboop calls siglongjmp from a signal handler.  Check if that is
	really portable.
	* scripts/xenofarm.sh: Run the test-sigjmp program as a separate
	task.
	* src/server/testsuite/Makefile.am (check_PROGRAMS): Added
	test-sigjmp.
	(test_sigjmp_SOURCES): New variable.
	(test_sigjmp_LDADD): New variable.
	(check-test-sigjmp): New target.
	* src/server/testsuite/test-sigjmp.c: New test program.  Verify
	that select can be broken by a siglongjmp call from a signal
	handler.

1497 1498
2003-07-03  Per Cederqvist  <ceder@ceder.dyndns.org>

1499 1500 1501
	Turn on the -Wfloat-equal gcc warning.
	* configure.in: Added -Wfloat-equal to CFLAGS.

1502 1503 1504 1505 1506
	Update the test suite for the denial-of-service fix.
	* src/server/testsuite/lyskomd.0/01.exp: Expect the get-last-text,
	find-next-text-no and find-previous-text-no requests to fail when
	the user isn't logged in.

1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520
2003-05-09  Per Cederqvist  <ceder@ingate.com>

	Require that the user is logged in before allowing him to do
	get-last-text, find-next-text-no or find-previous-text-no.  This
	fixes a denial-of-service attack reported by Calle Dybedahl.
	* src/server/text.c (get_last_text): Require the user to be logged
	in.
	(find_next_text_no): Ditto.
	(find_previous_text_no): Ditto.
	* doc/Protocol-A.texi (get-last-text): This request now requires
	that the user is logged in.
	(find-next-text-no): Ditto.
	(find-previous-text-no): Ditto.

1521 1522
2003-03-23  Per Cederqvist  <ceder@ceder.dyndns.org>

1523 1524 1525 1526
	Don't copy zero-length arrays.  (Bug 1005).
	* src/server/memory.c (copy_membership): Don't allocate a copy of
	read_ranges if read_ranges is NULL.

1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541
	Test for bug 1005.
	* src/server/testsuite/lyskomd.0/36.exp: New file that triggers an
	assertion.
	* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
	36.exp.

	Don't copy zero-length arrays.
	* src/server/membership.c (read_ranges_precondition): Don't
	allocate a copy of read_ranges if read_ranges is NULL.

	Code cleanup.
	* src/server/prot-a-output.c (prot_a_output_read_texts): Coding
	standards issue: compare the pointer read_ranges against NULL, not
	0.

1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561
2003-03-15  Per Cederqvist  <ceder@ceder.dyndns.org>

	Remove the "magic" field of Connection.  Valgrind provides a
	better and less intrusive way to find memory allocation errors.
	* src/server/connections.h (CONN_MAGIC_ALLOC): Removed.
	(CONN_MAGIC_FREE): Removed.
	(Connection): Removed the magic field.
	* src/server/internal-connections.c (init_connection): Don't set
	the magic field.
	(new_client): Ditto.
	(kill_client): Ditto.
	* src/server/connections.c (logout_client): Don't check the magic
	field.

	Allow test suite configuration (such as the timeout) to be
	overridden in localcfg.exp.
	* src/server/testsuite/config/unix.exp: Source config/localcfg.exp
	if it exists.
	* src/server/testsuite/config/.cvsignore: Ignore localcfg.exp.

Per Cederqvist's avatar
Per Cederqvist committed
1562 1563 1564 1565 1566 1567
2003-03-08  Per Cederqvist  <ceder@ceder.dyndns.org>

	Port 4894 is official.
	* doc/Protocol-A.texi (Connecting to the Server): Mention that
	port 4894 is registered with IANA.

Per Cederqvist's avatar