Index: filed.c ================================================================== --- filed.c +++ filed.c @@ -263,26 +263,10 @@ } return(NULL); } -static int filed_logging_thread_init(FILE *logfp) { - struct filed_logging_thread_args *args; - pthread_t thread_id; - - args = malloc(sizeof(*args)); - args->fp = logfp; - - filed_log_msg_list = NULL; - - pthread_mutex_init(&filed_log_msg_list_mutex, NULL); - - pthread_create(&thread_id, NULL, filed_logging_thread, args); - - return(0); -} - static void filed_log_msg(const char *fmt, ...) { struct filed_log_entry *entry; va_list args; entry = malloc(sizeof(*entry)); @@ -306,11 +290,10 @@ pthread_cond_signal(&filed_log_msg_list_ready); return; } - static const char *filed_log_ip(struct sockaddr *addr, char *buffer, size_t bufferlen) { struct sockaddr_in *addr_v4; struct sockaddr_in6 *addr_v6; const char *retval = NULL; @@ -330,10 +313,28 @@ retval = ""; } return(retval); } + +static int filed_logging_thread_init(FILE *logfp) { + struct filed_logging_thread_args *args; + pthread_t thread_id; + + args = malloc(sizeof(*args)); + args->fp = logfp; + + filed_log_msg_list = NULL; + + pthread_mutex_init(&filed_log_msg_list_mutex, NULL); + + pthread_create(&thread_id, NULL, filed_logging_thread, args); + + filed_log_msg("START"); + + return(0); +} #endif /* Format time per RFC2616 */ static char *filed_format_time(char *buffer, size_t buffer_len, const time_t timeinfo) { struct tm timeinfo_tm, *timeinfo_tm_p;