From: Frédéric Marchal Date: Tue, 5 Jan 2010 13:42:44 +0000 (+0000) Subject: Ported r186 from branches/v2_2_6_1 (flags accepted by real time report) X-Git-Tag: v2_2_7~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be081e8537a844d784ebdb96ab4d2fbcccf57471;p=thirdparty%2Fsarg.git Ported r186 from branches/v2_2_6_1 (flags accepted by real time report) --- diff --git a/ChangeLog b/ChangeLog index 6349916..3f13a52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,9 +17,8 @@ Jan-04-2010 Version 2.2.7 - Only copy the files when creating the directory with the images to link the reports to. - Directories deleted without using the rm system command. - Index created using an internal sort algorithm instead of a system call. - - Real time report can use the IP address instead of the user name. -Dec-31-2009 Version 2.2.6.1 +Jan-05-2010 Version 2.2.6.1 - Remove unnecessary dependency on off_t. - Configuration doesn't fail if rlim_t is not available. - Test for the availability of -Werror=implicit-function-declaration and -Werror=format flags in gcc (thanks to Murilo Moreira de Oliveira and pjetko). @@ -32,6 +31,7 @@ Dec-31-2009 Version 2.2.6.1 - The date read from sarg-date was not properly parsed and would produce a wrongly sorted index across a year change (thanks to rcastanheira for pointing this out). - my_mkdir changed to avoid the use of getword, be simpler and, maybe, work reliably on windows. - Makefile supports DESTDIR for easy package creation (thanks to Erjo). + - Real time report honour the user_ip flag of the configuration file and the -l and -n passed on command line. Oct-14-2009 Version 2.2.6 - Protection against buffer overflows in getword and friends and report the origin of the error instead of always blaming access.log. diff --git a/log.c b/log.c index f6d9f58..1398f8d 100644 --- a/log.c +++ b/log.c @@ -438,6 +438,10 @@ int main(int argc,char *argv[]) if(access(ConfigFile, R_OK) == 0) getconf(); + if(UserIp) userip++; + + if(dns) Ip2Name=1; + if(realt) { realtime(); exit(0); @@ -505,10 +509,6 @@ int main(int argc,char *argv[]) if(strcmp(ExcludeUsers,"indexonly") == 0) indexonly++; if(strcmp(Index,"only") == 0) indexonly++; - if(dns) Ip2Name=1; - - if(UserIp) userip++; - if(strlen(MaxElapsed)>1) max_elapsed=atol(MaxElapsed); if(strlen(outdir)<1) strcpy(outdir,OutputDir);