X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fmonitord%2Fmonitord.c;h=8ae5c933117ac70a31737c8b2079f03d1a3ed0f0;hp=33ab59d3adc1da9cf26135eaa63bd58861bfc74c;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hpb=301048b51990573e58a30dc4a5bb4ec285cad554 diff --git a/src/monitord/monitord.c b/src/monitord/monitord.c index 33ab59d..8ae5c93 100755 --- a/src/monitord/monitord.c +++ b/src/monitord/monitord.c @@ -1,4 +1,5 @@ -/* @(#) $Id$ */ +/* @(#) $Id: ./src/monitord/monitord.c, 2011/09/08 dcid Exp $ + */ /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. @@ -18,10 +19,10 @@ /* Real monitord global */ void Monitord() { - time_t tm; - struct tm *p; + time_t tm; + struct tm *p; - int today = 0; + int today = 0; int thismonth = 0; int thisyear = 0; @@ -31,18 +32,18 @@ void Monitord() sleep(10); memset(str, '\0', OS_SIZE_1024 +1); - - + + /* Getting currently time before starting */ tm = time(NULL); p = localtime(&tm); - + today = p->tm_mday; thismonth = p->tm_mon; thisyear = p->tm_year+1900; - - + + /* Connecting to the message queue * Exit if it fails. */ @@ -60,7 +61,7 @@ void Monitord() merror(QUEUE_SEND, ARGV0); } - + /* Main monitor loop */ while(1) { @@ -73,7 +74,7 @@ void Monitord() { monitor_agents(); } - + /* Day changed, deal with log files */ if(today != p->tm_mday) {