From: Frederic Marchal Date: Wed, 4 Mar 2015 19:27:21 +0000 (+0100) Subject: Proxy authentication code is ignored when building the report X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d6e3e724b6eab1951f8bc12f4ff4b25c90bbd8cd;p=thirdparty%2Fsarg.git Proxy authentication code is ignored when building the report The user report excludes HTTP code 407 meaning that the proxy requires an authentication. It must be excluded too when summing up the downloaded size while reading the input log. The previous code aborted with an error if --enable-extraprotection was used and the log contained a 407 code. Conflicts: log.c --- diff --git a/readlog.c b/readlog.c index c070338..dfdf21e 100644 --- a/readlog.c +++ b/readlog.c @@ -577,8 +577,10 @@ static void ReadOneLogFile(struct ReadLogDataStruct *Filter,const char *arq) } } #ifdef ENABLE_DOUBLE_CHECK_DATA - ufile->user->nbytes+=log_entry.DataSize; - ufile->user->elap+=log_entry.ElapsedTime; + if (strcmp(log_entry.HttpCode,"TCP_DENIED/407")!=0) { + ufile->user->nbytes+=log_entry.DataSize; + ufile->user->elap+=log_entry.ElapsedTime; + } #endif if (ufile->file==NULL) {