From fea1356c5e3651dac98b6e505901983e9d02ce01 Mon Sep 17 00:00:00 2001 From: yaworsky Date: Mon, 24 Oct 2005 12:55:16 +0000 Subject: Prepared for various destination types. --- daemon/syslogd.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'daemon/syslogd.c') diff --git a/daemon/syslogd.c b/daemon/syslogd.c index 59ede6d..8d9f906 100644 --- a/daemon/syslogd.c +++ b/daemon/syslogd.c @@ -165,7 +165,7 @@ static void mux_message( struct message* msg ) if( !filter_message( msg, logpath->filter ) ) continue; - write_message( msg, logpath->destination ); + logpath->destination->put( logpath->destination, msg ); } release_message( msg ); @@ -494,6 +494,18 @@ static unsigned __stdcall message_processor( void* arg ) return 0; } +/****************************************************************************** + * fini_destinations + * + * for each destination call fini method + */ +static void fini_destinations() +{ + GList *dest; + for( dest = destinations; dest; dest = dest->next ) + ((struct destination*) dest)->fini( (struct destination*) dest ); +} + /****************************************************************************** * main syslogd function * @@ -584,7 +596,7 @@ done: CloseHandle( message_processor_thread ); } - fini_writer(); + fini_destinations(); fini_purger(); free_hostnames(); -- cgit v1.2.3