X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fshared%2Fdebug_op.c;h=6be1f8cc2a79cbbc079d8136d27c376f7baa2e47;hp=1c8343a724832179e2806c606d54f486a8d8a993;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hpb=301048b51990573e58a30dc4a5bb4ec285cad554 diff --git a/src/shared/debug_op.c b/src/shared/debug_op.c index 1c8343a..6be1f8c 100755 --- a/src/shared/debug_op.c +++ b/src/shared/debug_op.c @@ -1,4 +1,5 @@ -/* @(#) $Id$ */ +/* @(#) $Id: ./src/shared/debug_op.c, 2011/09/08 dcid Exp $ + */ /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. @@ -41,13 +42,13 @@ void _log(const char * msg,va_list args) va_list args2; FILE *fp; - + tm = time(NULL); p = localtime(&tm); /* Duplicating args */ va_copy(args2, args); - + /* If under chroot, log directly to /logs/ossec.log */ if(chroot_flag == 1) @@ -69,7 +70,7 @@ void _log(const char * msg,va_list args) if(fp) { (void)fprintf(fp,"%d/%02d/%02d %02d:%02d:%02d ", - p->tm_year+1900,p->tm_mon+1, + p->tm_year+1900,p->tm_mon+1, p->tm_mday,p->tm_hour,p->tm_min,p->tm_sec); (void)vfprintf(fp, msg, args); #ifdef WIN32 @@ -156,15 +157,15 @@ void log2file(const char * msg,... ) _log(msg, args); daemon_flag = dbg_tmp; - + va_end(args); } void ErrorExit(const char *msg, ...) { va_list args; - - #ifdef WIN32 + + #ifdef WIN32 /* If not MA */ #ifndef MA WinSetError(); @@ -197,13 +198,13 @@ void print_out(const char *msg, ...) /* Print to stderr */ (void)vfprintf(stderr, msg, args); - + #ifdef WIN32 (void)fprintf(stderr, "\r\n"); #else (void)fprintf(stderr, "\n"); #endif - + va_end(args); }