From: Frederic Marchal Date: Mon, 25 May 2015 18:14:05 +0000 (+0200) Subject: Read the useragent log even if no report date is specified X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=46ade5a5113c23a95c8b336742d59e922c037d70;p=thirdparty%2Fsarg.git Read the useragent log even if no report date is specified The useragent log was ignored if the report date was not defined on the command line. The only way to generate the useragent log was to use command line option -d. --- diff --git a/useragent.c b/useragent.c index a3b5a4d..fd4179f 100644 --- a/useragent.c +++ b/useragent.c @@ -89,10 +89,12 @@ void useragent(void) debuga(__FILE__,__LINE__,_("Invalid date in file \"%s\"\n"),UserAgentLog); exit(EXIT_FAILURE); } - buildymd(day,month,year,wdate,sizeof(wdate)); - ndate=atoi(wdate); - if (ndateduntil) break; + if (dfrom!=0 || duntil!=0){ + buildymd(day,month,year,wdate,sizeof(wdate)); + ndate=atoi(wdate); + if (ndateduntil) break; + } if(totregsl == 1) strcpy(idate,data); strcpy(fdate,data);