diff options
author | yaworsky <yaworsky> | 2005-10-24 12:55:16 +0000 |
---|---|---|
committer | yaworsky <yaworsky> | 2005-10-24 12:55:16 +0000 |
commit | fea1356c5e3651dac98b6e505901983e9d02ce01 (patch) | |
tree | 0c97df5acd41466836dcecc69b9b813933e7b18f /daemon/syslogd.c | |
parent | 3f233602e265c7a1cf641e74ac748762d7b27bde (diff) | |
download | syslog-win32-fea1356c5e3651dac98b6e505901983e9d02ce01.tar.gz syslog-win32-fea1356c5e3651dac98b6e505901983e9d02ce01.tar.xz syslog-win32-fea1356c5e3651dac98b6e505901983e9d02ce01.zip |
Prepared for various destination types.
Diffstat (limited to 'daemon/syslogd.c')
-rw-r--r-- | daemon/syslogd.c | 16 |
1 files changed, 14 insertions, 2 deletions
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 ); @@ -495,6 +495,18 @@ static unsigned __stdcall message_processor( void* arg ) } /****************************************************************************** + * 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 * * global initialization; invoke listener @@ -584,7 +596,7 @@ done: CloseHandle( message_processor_thread ); } - fini_writer(); + fini_destinations(); fini_purger(); free_hostnames(); |