From df605232f1d71f64bd120e70d57b1fcc5fcbf29b Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 15 Jun 2007 08:52:20 +0000 Subject: re-wrote syslog.c from scratch. Changed interface in klogd to support the change. --- NEWS | 8 +++++--- klogd.c | 16 +++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 47fec761..b7eac9e7 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ --------------------------------------------------------------------------- -Version 1.13.3 (RGer), 2007-??-?? +Version 1.13.3 (RGer), 2007-06-15 - create a version of syslog.c from scratch. This is now - highly optimized for rsyslog - removes an incompatible license problem as the original @@ -7,8 +7,10 @@ Version 1.13.3 (RGer), 2007-??-?? - fixed in the regard that rklogd will continue to work when rsysogd has been restarted (the original version, as well as sysklogd, will remain silent then) - - solved an issue with an extra NUL char at message end that the - original version had + - solved an issue with an extra NUL char at message end that the + original version had +- applied some changes to klogd to care for the new interface +- fixed a bug in syslogd.c which prevented compiling under debian --------------------------------------------------------------------------- Version 1.13.2 (RGer), 2007-06-13 - lib order in makefile patched to facilitate static linking - thanks diff --git a/klogd.c b/klogd.c index ee2ba4aa..2e7c0428 100644 --- a/klogd.c +++ b/klogd.c @@ -339,7 +339,7 @@ extern void Syslog(int priority, char *fmt, ...) va_list ap; char *argl; - if ( debugging ) + if(debugging) { fputs("Logging line:\n", stderr); fprintf(stderr, "\tLine: %s\n", fmt); @@ -437,10 +437,7 @@ static void CloseLogSrc(void) } -void restart(sig) - - int sig; - +void restart(int sig) { signal(SIGCONT, restart); change_state = 1; @@ -470,7 +467,6 @@ void reload_daemon(int sig) change_state = 1; reload_symbols = 1; - if ( sig == SIGUSR2 ) { ++reload_symbols; @@ -483,7 +479,7 @@ void reload_daemon(int sig) } -static void Terminate() +static void Terminate(void) { CloseLogSrc(); Syslog(LOG_INFO, "Kernel log daemon terminating."); @@ -647,7 +643,9 @@ static int copyin( char *line, int space, count = len < space ? len : space; - for(i=0; i