X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fshared%2Fdebug_op.c;h=6be1f8cc2a79cbbc079d8136d27c376f7baa2e47;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hp=9c2ac06479f7b01e744e9eb2a063a5bf4144abc2;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/shared/debug_op.c b/src/shared/debug_op.c index 9c2ac06..6be1f8c 100755 --- a/src/shared/debug_op.c +++ b/src/shared/debug_op.c @@ -1,11 +1,12 @@ -/* @(#) $Id: debug_op.c,v 1.15 2009/06/24 18:53:08 dcid Exp $ */ +/* @(#) $Id: ./src/shared/debug_op.c, 2011/09/08 dcid Exp $ + */ /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * * This program is a free software; you can redistribute it * and/or modify it under the terms of the GNU General Public - * License (version 3) as published by the FSF - Free Software + * License (version 2) as published by the FSF - Free Software * Foundation */ @@ -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); }