]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Ported r186 from branches/v2_2_6_1 (flags accepted by real time report)
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 5 Jan 2010 13:42:44 +0000 (13:42 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 5 Jan 2010 13:42:44 +0000 (13:42 +0000)
ChangeLog
log.c

index 634991604453b8d4bfcb6fc418a247a63ac56f08..3f13a52174431691b5d4b96b075ba1a1856b6ed4 100644 (file)
--- 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 f6d9f58344722aebc8e987c7ae355174009bae5d..1398f8dfd5097d42a3c1eb857862e6a525198a8d 100644 (file)
--- 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);