aboutsummaryrefslogtreecommitdiffstats
path: root/daemon/syslogd.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/syslogd.c')
-rw-r--r--daemon/syslogd.c16
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();