Commit e6c327b9 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(write_queue_change_callback): New static function. Update STAT_SEND_QUEUE.

(server_init): Register write_queue_change_callback with isc.
parent 4f151039
/*
* $Id: ramkomd.c,v 0.120 2003/07/31 23:02:47 ceder Exp $
* $Id: ramkomd.c,v 0.121 2003/08/01 13:14:18 ceder Exp $
* Copyright (C) 1991-1999, 2001-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -157,6 +157,15 @@ set_handler_sig_ign(struct sigaction *ptr)
#endif
static isc_write_queue_change_cb write_queue_change_callback;
static void
write_queue_change_callback(int delta)
{
update_stat(STAT_SEND_QUEUE, delta);
}
static void
server_init(const char *host, const char * client_port)
{
......@@ -216,7 +225,8 @@ server_init(const char *host, const char * client_port)
&isc_realloc_wrapper,
&isc_free_wrapper);
kom_server_mcb = isc_initialize(oop_sys_source(kom_server_oop_src));
kom_server_mcb = isc_initialize(oop_sys_source(kom_server_oop_src),
write_queue_change_callback);
if ( kom_server_mcb == NULL )
restart_kom("server_init: can't isc_initialize()\n");
isc_cfg_fd_relocate(kom_server_mcb, PROTECTED_FDS);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment