]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Take the useragent log file into account
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Mon, 25 May 2015 18:10:53 +0000 (20:10 +0200)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Mon, 25 May 2015 18:10:53 +0000 (20:10 +0200)
The useragent log file provided on the command line with option -b was
ignored.

Thanks to Yakushev Evgeniy for reporting this bug.

log.c

diff --git a/log.c b/log.c
index c38e74140c73d86e4ec052374b17decb2a7ac1b3..681197a4c0acddedd4b29b2ab918545bc2514766 100644 (file)
--- a/log.c
+++ b/log.c
@@ -549,7 +549,7 @@ int main(int argc,char *argv[])
        else
                ReadFilter.max_elapsed=0;
 
-       if(uagent[0] == '\0') strcpy(uagent,UserAgentLog);
+       if(uagent[0] != '\0') strcpy(UserAgentLog,uagent);
 
        if(tmp[0] == '\0') strcpy(tmp,TempDir);
        else strcpy(TempDir,tmp);