From 46ade5a5113c23a95c8b336742d59e922c037d70 Mon Sep 17 00:00:00 2001 From: Frederic Marchal Date: Mon, 25 May 2015 20:14:05 +0200 Subject: [PATCH] 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. --- useragent.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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); -- 2.47.2