From: pk910 Date: Thu, 16 Feb 2012 16:27:41 +0000 (+0100) Subject: fixed some missing newlines (\n) in putlog lines X-Git-Tag: v5.4~46 X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=commitdiff_plain;h=acf398714c6bdac0c794884842164e0651b6e942 fixed some missing newlines (\n) in putlog lines --- diff --git a/src/main.c b/src/main.c index af42218..c5413d9 100644 --- a/src/main.c +++ b/src/main.c @@ -116,7 +116,7 @@ void * thread_main(void *arg) { socket_wait = time(0) + SOCKET_SELECT_TIME; do { if(!socket_loop(SOCKET_SELECT_TIME)) { - putlog(LOGLEVEL_ERROR, "No more active Bots... shutting down."); + putlog(LOGLEVEL_ERROR, "No more active Bots... shutting down.\n"); cleanup(); exit(0); } @@ -229,8 +229,8 @@ int main(int argc, char *argv[]) { atexit(exit_daemon); FILE *pidfile = fopen(PID_FILE, "w"); if (pidfile == NULL) { - fprintf(stderr, "Unable to create PID file: %s", strerror(errno)); - putlog(LOGLEVEL_ERROR, "Unable to create PID file: %s", strerror(errno)); + fprintf(stderr, "Unable to create PID file: %s\n", strerror(errno)); + putlog(LOGLEVEL_ERROR, "Unable to create PID file: %s\n", strerror(errno)); } else { fprintf(pidfile, "%i\n", (int)getpid()); fclose(pidfile); @@ -326,7 +326,7 @@ main: socket_wait = time(0) + SOCKET_SELECT_TIME; do { if(!socket_loop(SOCKET_SELECT_TIME)) { - putlog(LOGLEVEL_ERROR, "No more active Bots... shutting down."); + putlog(LOGLEVEL_ERROR, "No more active Bots... shutting down.\n"); cleanup(); exit(0); } diff --git a/src/signal.c b/src/signal.c index 9ec12f0..8886e6f 100644 --- a/src/signal.c +++ b/src/signal.c @@ -24,7 +24,7 @@ static void sigcrash(); static void sigexit(); void sighandler(int signum) { - putlog(LOGLEVEL_INFO, "Received Signal %d", signum); + putlog(LOGLEVEL_INFO, "Received Signal %d\n", signum); signal(signum, SIG_DFL); switch(signum) { case SIGABRT: @@ -64,13 +64,13 @@ static void sigcrash(int signum) { signame = "SIGUNKNOWN"; break; } - putlog(LOGLEVEL_ERROR, "NeonServ process crashed (%s)", signame); + putlog(LOGLEVEL_ERROR, "NeonServ process crashed (%s)\n", signame); #ifndef WIN32 char gcore[50]; sprintf(gcore, "gcore %u", getpid()); system(gcore); //generate core file coregen = "core file generated."; - putlog(LOGLEVEL_ERROR | LOGLEVEL_INFO, "generated core file."); + putlog(LOGLEVEL_ERROR | LOGLEVEL_INFO, "generated core file.\n"); #endif char *alertchan = get_string_field("General.alertchan"); if(alertchan) { @@ -88,7 +88,7 @@ static void sigcrash(int signum) { bot->flags &= SOCKET_FLAG_CONNECTED; } } - putlog(LOGLEVEL_INFO, "hard shutdown..."); + putlog(LOGLEVEL_INFO, "hard shutdown...\n"); exit_daemon(); usleep(1000000); //hard restart