]> git.ipfire.org Git - thirdparty/sarg.git/log
thirdparty/sarg.git
8 years agoUpdate doxygen file
Frederic Marchal [Fri, 2 Oct 2015 16:12:11 +0000 (18:12 +0200)] 
Update doxygen file

File simply updated with

    doxygen -u

8 years agoUpdate the Russian translation.
Frederic Marchal [Sat, 19 Sep 2015 13:54:58 +0000 (15:54 +0200)] 
Update the Russian translation.

8 years agoMerge branch 'HEAD' of ssh://fmarchal@git.code.sf.net/p/sarg/code
Frederic Marchal [Sat, 19 Sep 2015 13:54:11 +0000 (15:54 +0200)] 
Merge branch 'HEAD' of ssh://fmarchal@git.code.sf.net/p/sarg/code

8 years agoThe list of users to include in the report is processed after every aliasing mechanism
Frederic Marchal [Sat, 19 Sep 2015 13:49:12 +0000 (15:49 +0200)] 
The list of users to include in the report is processed after every aliasing mechanism

It is more logical to filter the users to include in the report after they
have been aliased to the final name. It makes it possible to identify the
final user irrespective of the name she happens to have when connecting to
the proxy.

8 years agoTranslate sarg-php into Russian
Frederic Marchal [Thu, 10 Sep 2015 20:14:58 +0000 (22:14 +0200)] 
Translate sarg-php into Russian

Thanks to Evgeniy Yakushev for this translation.

8 years agoUpdate the Russian translation
Frederic Marchal [Thu, 3 Sep 2015 16:01:36 +0000 (18:01 +0200)] 
Update the Russian translation

Thanks to Evgeniy Yakushev for this work.

8 years agoLimit the useragent log period to the same period as the access log
Frederic Marchal [Fri, 21 Aug 2015 17:59:26 +0000 (19:59 +0200)] 
Limit the useragent log period to the same period as the access log

If no explicit date range was provided on the command line, the useragent
report used to contain the content of the whole useragent.log file even if
it covered a wider period than the access log.

Now, the useragent report only covers the same period as the access log
provided they both overlap. If both logs cover distinct periods, the
useragent log is not produced.

8 years agoRewrite the useragent log processing
Frederic Marchal [Fri, 21 Aug 2015 17:24:55 +0000 (19:24 +0200)] 
Rewrite the useragent log processing

Create more functions to distinguish the reading of the useragent log file
from the report generation.

The idea is to prepare the code to read the useragent data from other
sources than the useragent_log option.

8 years agoIgnore empty URL in extended log format
Frederic Marchal [Thu, 20 Aug 2015 18:16:14 +0000 (20:16 +0200)] 
Ignore empty URL in extended log format

The sample log provided here:
https://sourceforge.net/p/sarg/discussion/234317/thread/224c3daa/#a5ca
shows that some lines can have an empty URL.

It looks like it denotes failed connection attempts to unavailable
resources. Instead of aborting the processing, we ignore such lines.

The summary presented when debug output is enabled shows how many lines
have been ignored.

8 years agoHide the alias prefix for the user name
Frederic Marchal [Mon, 27 Jul 2015 18:11:47 +0000 (20:11 +0200)] 
Hide the alias prefix for the user name

When a host name is replaced by an alias, the host name is prefixed with a
* to write it with no link to a special function such as a link to block
that url.

Host name don't need that prefix.

8 years agoImprove the documentation in sarg.conf
Frederic Marchal [Mon, 27 Jul 2015 18:10:21 +0000 (20:10 +0200)] 
Improve the documentation in sarg.conf

Write a more complete documentation about exclusion and alias files.

8 years agoAccept case insensitive regular expressions
Frederic Marchal [Mon, 27 Jul 2015 18:09:38 +0000 (20:09 +0200)] 
Accept case insensitive regular expressions

Such a regex must be suffixed with the lower case "i".

As a consequence, a regex must now be separated from the alias by at least
one space or tab in the definition file.

8 years agoFix a use after free buffer in the regex
Frederic Marchal [Mon, 27 Jul 2015 17:53:58 +0000 (19:53 +0200)] 
Fix a use after free buffer in the regex

A buffer was used after freeing its memory. As a consequence, replacement
operators were not working in regex.

8 years agoFix a comment indentation.
Frederic Marchal [Mon, 27 Jul 2015 17:51:45 +0000 (19:51 +0200)] 
Fix a comment indentation.

8 years agoProcess users in redirector log as those from the access log
Frederic Marchal [Sun, 26 Jul 2015 08:30:03 +0000 (10:30 +0200)] 
Process users in redirector log as those from the access log

Users in the redirector log are include, excluded and aliased as those in
the access.log.

8 years agoPerform the user's ID processing in one function
Frederic Marchal [Sun, 26 Jul 2015 08:15:31 +0000 (10:15 +0200)] 
Perform the user's ID processing in one function

There are quite a lot of options to drive the user's ID or IP address
processing, replace the ID, include or exclude the entry from the report
and so on.

That processing is only applied in full to the access.log. The redirector
and dansguardian logs are much more primitive in comparison.

By moving the processing to one function, I intent to use it everywhere.

8 years agoStrip suffix length is a global variable
Frederic Marchal [Sun, 26 Jul 2015 07:34:42 +0000 (09:34 +0200)] 
Strip suffix length is a global variable

Compute only once the suffix length to strip from the user name and store
it globally.

8 years agoCopy less bytes from the user name
Frederic Marchal [Sun, 26 Jul 2015 06:02:32 +0000 (08:02 +0200)] 
Copy less bytes from the user name

When removing a user suffix, copy and truncate the user name in one call.

8 years agoFix an error introduced when stripping the user domain
Frederic Marchal [Fri, 24 Jul 2015 14:09:20 +0000 (16:09 +0200)] 
Fix an error introduced when stripping the user domain

Several reports such as the download and authentication reports would
fail with an error about unknown user "-".

It has been fixed by choosing a new method to strip the domain.

The change partially reverts some changes made in commit
36a0b94cbcaa8a9899fcc878639945e8787d0fec that were responsible for the
proper user name not being propagated to the intermediary report files.

Thanks to Yakushev Evgeniy for reporting this bug.

8 years agoRead an extended log even if cs-uri is split over several columns
Frederic Marchal [Fri, 24 Jul 2015 07:48:44 +0000 (09:48 +0200)] 
Read an extended log even if cs-uri is split over several columns

Sarg used to require that the visited URL be stored in column cs-uri of the
extended log format. But the URL can be split over the cs-uri-scheme,
cs-host, cs-uri-port, cs-uri-path and cs-uri-query columns.

Sarg detects the columns and re-create the full URL if cs-uri is not
found.

8 years agoInclude sub configuration files
Frederic Marchal [Thu, 23 Jul 2015 19:32:34 +0000 (21:32 +0200)] 
Include sub configuration files

Sarg.conf can include other configuration files with the "include"
directive. It can be used to store common option in one file and create
shorter sarg.conf dedicated to reporting tasks.

8 years agoImprove the documentation for strip_user_suffix
Frederic Marchal [Thu, 23 Jul 2015 15:50:46 +0000 (17:50 +0200)] 
Improve the documentation for strip_user_suffix

Provide a link to the useralias option that can do the same as
strip_user_suffix and much more but is more difficult to set up.

8 years agoStrip the user suffix from the redirector log
Frederic Marchal [Wed, 22 Jul 2015 18:35:23 +0000 (20:35 +0200)] 
Strip the user suffix from the redirector log

User names are also truncated in the suffix is found in the redirector log.

8 years agoStrip a suffix from the user name
Frederic Marchal [Wed, 22 Jul 2015 18:29:00 +0000 (20:29 +0200)] 
Strip a suffix from the user name

Only applied to the access.log file.

Not yet available for the redirector.log.

8 years agoUpdate a translation error in the French messages
Frederic Marchal [Mon, 20 Jul 2015 12:21:09 +0000 (14:21 +0200)] 
Update a translation error in the French messages

The first line in the e-mail report was completely wrong!

8 years agoGenerate a top user email with the same options as the html report
Frederic Marchal [Mon, 20 Jul 2015 12:18:26 +0000 (14:18 +0200)] 
Generate a top user email with the same options as the html report

The produced e-mail is still plain text but it is possible to sort the
entries and limit the number of lines with the same options as the html
report.

The top user list is the only report currently supporting that feature.

8 years agoSplit the top user report generation
Frederic Marchal [Sun, 19 Jul 2015 12:55:31 +0000 (14:55 +0200)] 
Split the top user report generation

Use one function to prepare the top user list and another to generate the
html report.

It is the first step to merge the html and email reports.

8 years agoLimit the number of top users reported in the mail report
Frederic Marchal [Fri, 17 Jul 2015 19:34:17 +0000 (21:34 +0200)] 
Limit the number of top users reported in the mail report

The topuser_num parameter in sarg limits the number of users reported in
the email report. Set it to zero to report every user as was done before.

Thanks to Yakushev Evgeniy for reporting this limitation.

8 years agoProperly limit the redirector log to the date range covered by the access log
Frederic Marchal [Tue, 14 Jul 2015 18:25:59 +0000 (20:25 +0200)] 
Properly limit the redirector log to the date range covered by the access log

If no date range are provided on the command line, the redirector log would
contain the whole content of the blocked log.

This patch limit the content of the redirector log to the date range found
in the access.log.

8 years agoSend email report directly to stdout
Frederic Marchal [Sun, 12 Jul 2015 19:14:59 +0000 (21:14 +0200)] 
Send email report directly to stdout

If the email report must be sent to stdout, do it directly. Don't use
another temporary file simply to output it later to stdout.

8 years agoMake it possible to delete an old temporary directory
Frederic Marchal [Sun, 12 Jul 2015 19:13:43 +0000 (21:13 +0200)] 
Make it possible to delete an old temporary directory

Sarg prepares the report in a the temporary directory. The directory must
be empty before starting the report generation. Deleting an old stray
temporary directory must be made with care to make sure we don't delete
a wrong directory.

The old temporary directory check would not take the email report generated
files into account.

8 years agoFix a sort error when generating an email report
Frederic Marchal [Sun, 12 Jul 2015 19:11:26 +0000 (21:11 +0200)] 
Fix a sort error when generating an email report

A line had been mistakenly deleted from the source code. Generating an
email report was not possible any more.

Thanks to Yakushev Evgeniy for reporting this bug.

8 years agoRemove one unused parameter from the mail function.
Frederic Marchal [Sun, 12 Jul 2015 19:09:47 +0000 (21:09 +0200)] 
Remove one unused parameter from the mail function.

8 years agoSimplify the code to create the report directory
Frederic Marchal [Sun, 12 Jul 2015 18:37:47 +0000 (20:37 +0200)] 
Simplify the code to create the report directory

There were too many string copying in that code and the code path was
needlessly duplicated depending on the type of index tree to generate.

8 years agoDon't delete anything from the temporary directory if unsure
Frederic Marchal [Sun, 12 Jul 2015 17:43:27 +0000 (19:43 +0200)] 
Don't delete anything from the temporary directory if unsure

Sarg must delete any previous stray temporary directory before filling it
with the current log data. But sarg must not just delete any directory and
its content if it isn't ours. Therefore, sarg check the directory content
to make sure that it only contains files that may belong to us.

There was an error in that routine. It would recursively delete directories
found in the candidate temporary directory before making sure the whole
directory content can be safely deleted.

This problem is fixed here.

8 years agoGenerate redirector log even if -d is not given
Frederic Marchal [Sun, 12 Jul 2015 16:24:19 +0000 (18:24 +0200)] 
Generate redirector log even if -d is not given

The redirector log would only be produced if a date range is given on the
command line or redirector_filter_out_date was set in sarg.conf.

This patch makes sarg use the whole redirector log if no date range is
provided.

8 years agoDon't glob the file name "-" that means to read from stdin
Frederic Marchal [Tue, 23 Jun 2015 15:48:12 +0000 (17:48 +0200)] 
Don't glob the file name "-" that means to read from stdin

The special file name "-" must not be globed as the content will be read
from stdin.

This change fix the error message: No files matching "-"

Thanks to Yakushev Evgeniy for reporting this bug.

8 years agoUpdate the configure script and its dependencies
Frederic Marchal [Mon, 22 Jun 2015 20:47:10 +0000 (22:47 +0200)] 
Update the configure script and its dependencies

The configure script was rebuild while trying to find out how to get rid
of gettext 0.19 and use gettext 0.18 instead.

The po/Makefile.in file now on my computer requires gettext 0.18 as
expected but I don't know what I did to achieve that result. I still don't
know what tool is responsible for generating Makefile.in from
Makefile.in.in.

8 years agoRestore support for bzip2 files
Frederic Marchal [Sat, 13 Jun 2015 18:30:39 +0000 (20:30 +0200)] 
Restore support for bzip2 files

Sarg can read log compressed with bzip2 again.

It doesn't use an external program to do that. It relies on the bzlib
library if it is found.

8 years agoRewrite the check for zlib
Frederic Marchal [Sat, 13 Jun 2015 18:23:25 +0000 (20:23 +0200)] 
Rewrite the check for zlib

Use quote characters around arguments.

8 years agoIndent the configure script for more readability.
Frederic Marchal [Sat, 13 Jun 2015 14:45:28 +0000 (16:45 +0200)] 
Indent the configure script for more readability.

8 years agoRemove trailing lone commas in the configure script.
Frederic Marchal [Sat, 13 Jun 2015 14:39:10 +0000 (16:39 +0200)] 
Remove trailing lone commas in the configure script.

8 years agoFile globbing is mandatory but can be disabled
Frederic Marchal [Sat, 13 Jun 2015 14:35:48 +0000 (16:35 +0200)] 
File globbing is mandatory but can be disabled

The configure script requires glob.h to be available by default but allow
the user to disable it.

8 years agoChange a message string.
Frederic Marchal [Sat, 13 Jun 2015 14:05:52 +0000 (16:05 +0200)] 
Change a message string.

8 years agoUse AS_IF in the configure script
Frederic Marchal [Sat, 13 Jun 2015 14:05:33 +0000 (16:05 +0200)] 
Use AS_IF in the configure script

I just found out about that macro that is supposed to make the code more
portable.

The indentation of the AS_IF blocks was a bit changed to use tabs instead
of spaces.

8 years agoRead compressed useragent logs
Frederic Marchal [Thu, 11 Jun 2015 20:08:46 +0000 (22:08 +0200)] 
Read compressed useragent logs

Only gzip files are supported for now.

8 years agoDisplay an error when trying to read a Z file
Frederic Marchal [Thu, 11 Jun 2015 16:25:41 +0000 (18:25 +0200)] 
Display an error when trying to read a Z file

Z compressed files are not supported any longer because I want to use
libraries instead of relying on external processes to parse compressed
files. I haven't found a library or piece of code to read those files.

It is my understanding that the Z format is not used much these days. If
you think otherwise, please open a bug ticket.

8 years agoUse a library to read gzip access.log files
Frederic Marchal [Wed, 10 Jun 2015 19:22:24 +0000 (21:22 +0200)] 
Use a library to read gzip access.log files

LZW compressed files (.Z) are not supported any more until I find out how
to read such a file using a library.

Bzip2 files (.bz2) are not supported yet even thought an untested
non-working code exists in sarg.

8 years agoFails if no file names can be found when file globbing is on
Frederic Marchal [Tue, 9 Jun 2015 18:23:28 +0000 (20:23 +0200)] 
Fails if no file names can be found when file globbing is on

If file globbing is enabled and no files can be found to match the pattern,
sarg must fail as it does when file globbing is disabled (that was how
sarg worked before file globbing was programmed).

It is meant as a safety in case there is a problem with the generated log
files.

8 years agoChange the message saying there is a limit to the number of access_log
Frederic Marchal [Tue, 9 Jun 2015 18:20:44 +0000 (20:20 +0200)] 
Change the message saying there is a limit to the number of access_log

There is no fixed limit on the number of access_log that can be used in
sarg.conf or on the command line except for the available memory.

8 years agoAllow the use of wildcards in the access.log and useragent.log
Frederic Marchal [Tue, 9 Jun 2015 18:17:08 +0000 (20:17 +0200)] 
Allow the use of wildcards in the access.log and useragent.log

A file name can contain * or ? if configure was not run with
--without-glob.

It is possible to see if file globbing was compiled in by running sarg with
-x -V.

8 years agoDon't display the period covered by the logs if it is empty
Frederic Marchal [Tue, 9 Jun 2015 17:45:21 +0000 (19:45 +0200)] 
Don't display the period covered by the logs if it is empty

Sarg outputs a line with the earliest and latest dates found if the logs
but it displays 00/01/00 if no log was found. It is best not to display
anything in that case.

8 years agoDisplay version information after parsing every option
Frederic Marchal [Tue, 9 Jun 2015 17:39:44 +0000 (19:39 +0200)] 
Display version information after parsing every option

The version can be displayed with command line option --version or -V but
it is necessary to parse every option in case -x is provided.

It is intended to display what features are available when -x is passed
along with -V.

8 years agoAdd the stringbuffer.h include file to the cmake file
Frederic Marchal [Sun, 7 Jun 2015 19:08:44 +0000 (21:08 +0200)] 
Add the stringbuffer.h include file to the cmake file

That file has been overlooked.

8 years agoAdd a limit on the size of some string generated with sprintf
Frederic Marchal [Sun, 7 Jun 2015 19:08:11 +0000 (21:08 +0200)] 
Add a limit on the size of some string generated with sprintf

This is to avoid a buffer overflow.

8 years agoAccept multiple useragent logs
Frederic Marchal [Sun, 7 Jun 2015 19:07:20 +0000 (21:07 +0200)] 
Accept multiple useragent logs

Command line option -b can be repeated to add more useragent logs.

The useragent_log configuration option can be repeated multiple time to
scan several files.

8 years agoRename configure.in as configure.ac
Frederic Marchal [Mon, 25 May 2015 18:45:47 +0000 (20:45 +0200)] 
Rename configure.in as configure.ac

Automake 1.14 will deprecate configure.in. Only configure.ac will be
accepted and processed.

Git doesn't show it at all but nothing was changed inside the file itself.
Only its name was changed.

8 years agoRead the useragent log even if no report date is specified
Frederic Marchal [Mon, 25 May 2015 18:14:05 +0000 (20:14 +0200)] 
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.

8 years agoTake the useragent log file into account
Frederic Marchal [Mon, 25 May 2015 18:10:53 +0000 (20:10 +0200)] 
Take the useragent log file into account

The useragent log file provided on the command line with option -b was
ignored.

Thanks to Yakushev Evgeniy for reporting this bug.

8 years agoFix a spelling error in the name of libgd.
Frederic Marchal [Fri, 8 May 2015 17:14:29 +0000 (19:14 +0200)] 
Fix a spelling error in the name of libgd.

9 years agoUpdate the xgettext definition of debuga
Frederic Marchal [Sun, 26 Apr 2015 15:54:47 +0000 (17:54 +0200)] 
Update the xgettext definition of debuga

xgettext needs to know what argument of debuga is a c-format string to add
the proper flag in the po file. The printf-like argument changed place when
the source file and line number were added to debuga.

Function debugaz was not declared as a function taking a printf like
argument.

9 years agoDisplay the source of the message displayed on stderr
Frederic Marchal [Sun, 26 Apr 2015 15:52:54 +0000 (17:52 +0200)] 
Display the source of the message displayed on stderr

Messages that have been merged in previous commits cannot be distinguished
from each other. It makes debugging more difficult.

To solve this problem, when sarg is run with -zzz, the source file name
and the line number is displayed in the message prefix. It makes it easy to
look at the corresponding source code and understand why the message was
printed.

9 years agoTell the compiler that debuga_more uses printf like arguments.
Frederic Marchal [Sun, 26 Apr 2015 15:08:07 +0000 (17:08 +0200)] 
Tell the compiler that debuga_more uses printf like arguments.

9 years agoMinor message content adjustments.
Frederic Marchal [Sun, 26 Apr 2015 14:40:52 +0000 (16:40 +0200)] 
Minor message content adjustments.

9 years agoPut double quotes around remaining file names in messages
Frederic Marchal [Sun, 26 Apr 2015 14:40:09 +0000 (16:40 +0200)] 
Put double quotes around remaining file names in messages

Be consistent with the naming of files in messages. It makes life easier
for the translators.

9 years agoFix a message (missing colon).
Frederic Marchal [Sun, 26 Apr 2015 12:14:59 +0000 (14:14 +0200)] 
Fix a message (missing colon).

9 years agoMerge messages about memory shortage.
Frederic Marchal [Sun, 26 Apr 2015 12:14:18 +0000 (14:14 +0200)] 
Merge messages about memory shortage.

9 years agoMerge messages about IP addresses.
Frederic Marchal [Sun, 26 Apr 2015 12:00:36 +0000 (14:00 +0200)] 
Merge messages about IP addresses.

9 years agoMake the script to change copyright date executable.
Frederic Marchal [Sun, 26 Apr 2015 11:32:27 +0000 (13:32 +0200)] 
Make the script to change copyright date executable.

9 years agoMerge messages
Frederic Marchal [Sun, 26 Apr 2015 11:32:06 +0000 (13:32 +0200)] 
Merge messages

These messages are related to file manipulation.

9 years agoMerge the messages about invalid data
Frederic Marchal [Sun, 26 Apr 2015 11:30:40 +0000 (13:30 +0200)] 
Merge the messages about invalid data

There were far too many redundant messages to be translated just to report
errors in the data read from a file. The messages have been merged to
reduce the diversity in vocabulary.

9 years agoUpdate the copyright year in every source file
Frederic Marchal [Sun, 26 Apr 2015 07:32:16 +0000 (09:32 +0200)] 
Update the copyright year in every source file

I join a script to automatically update the year.

9 years agoFix the file name reported in a write error message
Frederic Marchal [Sat, 25 Apr 2015 19:30:05 +0000 (21:30 +0200)] 
Fix the file name reported in a write error message

An error message when closing a file was not reporting the right file name.

9 years agoOutput only two sets of messages when fclose fails
Frederic Marchal [Sat, 25 Apr 2015 19:29:28 +0000 (21:29 +0200)] 
Output only two sets of messages when fclose fails

One message is for write errors and the other is for read errors. Read
errors were mostly not detected before this change.

9 years agoRemove deleted C file from po source list
Frederic Marchal [Sun, 12 Apr 2015 14:38:12 +0000 (16:38 +0200)] 
Remove deleted C file from po source list

The source file charset.c was deleted a long time ago. It is now removed
from the list of the files to scan to update the po files.

9 years agoMore messages merged to reduce the number of messages to translate.
Frederic Marchal [Thu, 2 Apr 2015 19:28:24 +0000 (21:28 +0200)] 
More messages merged to reduce the number of messages to translate.

9 years agoMore messages merged to reduce the number of messages to translate.
Frederic Marchal [Thu, 2 Apr 2015 19:27:51 +0000 (21:27 +0200)] 
More messages merged to reduce the number of messages to translate.

9 years agoUse the function name in a message to reduce the number of messages.
Frederic Marchal [Thu, 2 Apr 2015 19:18:24 +0000 (21:18 +0200)] 
Use the function name in a message to reduce the number of messages.

9 years agoUse the same variable type in a message
Frederic Marchal [Thu, 2 Apr 2015 19:16:14 +0000 (21:16 +0200)] 
Use the same variable type in a message

To reduce the number of messages to translate, the index reported in the
message is always an int. There was no reasons to use something else in the
first place.

9 years agoFix a spelling error in messages.
Frederic Marchal [Thu, 2 Apr 2015 19:12:50 +0000 (21:12 +0200)] 
Fix a spelling error in messages.

9 years agoDon't check a write error in the trailer
Frederic Marchal [Thu, 2 Apr 2015 19:12:31 +0000 (21:12 +0200)] 
Don't check a write error in the trailer

Other fputs are not checked and any write error is caught more reliably
when the file is closed.

9 years agoNormalize the messages to have less messages to translate.
Frederic Marchal [Thu, 2 Apr 2015 19:08:06 +0000 (21:08 +0200)] 
Normalize the messages to have less messages to translate.

9 years agoFix a few spelling mistakes.
Frederic Marchal [Wed, 1 Apr 2015 18:20:14 +0000 (20:20 +0200)] 
Fix a few spelling mistakes.

9 years agoSimplify the messages to translate
Frederic Marchal [Wed, 1 Apr 2015 18:18:04 +0000 (20:18 +0200)] 
Simplify the messages to translate

Translated messages that differ only in the file name printed at the
end of the message are now split in two parts. The file name is taken out
of the translated message to leave only the common part to be translated.

9 years agoRemove old commented out code.
Frederic Marchal [Mon, 30 Mar 2015 18:57:06 +0000 (20:57 +0200)] 
Remove old commented out code.

9 years agoRemove execution bit on source files
Frederic Marchal [Mon, 30 Mar 2015 18:53:48 +0000 (20:53 +0200)] 
Remove execution bit on source files

Some c and h files had the execution bit set. It was a mistake.

9 years agoUpdate the build date and version number
Frederic Marchal [Thu, 19 Mar 2015 20:03:02 +0000 (21:03 +0100)] 
Update the build date and version number

Sarg is now labeled as version 2.4.0-pre2 dated from 2015-03-19.

9 years agoReal time report takes POST into account
Frederic Marchal [Thu, 19 Mar 2015 20:01:21 +0000 (21:01 +0100)] 
Real time report takes POST into account

As PUT and POST are very similar, there is no point in including the former
into the real time report and not the latter.

9 years agoMerge branch 'master' of /run/media/maf/TRACK/sarg/sarg
Frederic Marchal [Thu, 19 Mar 2015 19:58:43 +0000 (20:58 +0100)] 
Merge branch 'master' of /run/media/maf/TRACK/sarg/sarg

9 years agoGet rid of the dependency to an external tail command
Frederic Marchal [Thu, 19 Mar 2015 19:56:30 +0000 (20:56 +0100)] 
Get rid of the dependency to an external tail command

The real time report relied on an external "tail" command to get the last
lines of the input log file. That dependency has been removed.

Moreover, if several log files were passed, the real time report would
always read the first one. Now, sarg chooses the most recently modified log
file.

The input log file can be in any supported format. It doesn't have to be
a standard squid log format.

9 years agoCMake pack command ignores git instead of svn
Frédéric Marchal [Sat, 7 Mar 2015 12:33:30 +0000 (13:33 +0100)] 
CMake pack command ignores git instead of svn

The CMake command to create a package must ignore the .git directory. The
.svn directory isn't used any more.

9 years agoDon't search for bzero during configuration
Frédéric Marchal [Sat, 7 Mar 2015 12:31:57 +0000 (13:31 +0100)] 
Don't search for bzero during configuration

That function isn't used any more in sarg.

9 years agoIgnore negative elapsed time in squid log
Frederic Marchal [Thu, 5 Mar 2015 19:49:33 +0000 (20:49 +0100)] 
Ignore negative elapsed time in squid log

Squid sometime reports a negative elapsed time. Commit d91457d25 only
improperly fixed it. The negative value was still rejected as an invalid
line.

This fix detects the negative value and ignore it.

9 years agoConfigure the images directory in sarg.conf
Frederic Marchal [Thu, 5 Mar 2015 15:34:19 +0000 (16:34 +0100)] 
Configure the images directory in sarg.conf

The directory where the images resides can be changed at run time by
setting image_dir in sarg.conf.

9 years agoGet the file size with the available stat member
Frederic Marchal [Thu, 5 Mar 2015 14:35:03 +0000 (15:35 +0100)] 
Get the file size with the available stat member

On MinGW, the stat structure doesn't have all the member variables used to
compute the size of a file.

9 years agoLC_MESSAGES undeclared by MinGW
Frederic Marchal [Thu, 5 Mar 2015 14:30:20 +0000 (15:30 +0100)] 
LC_MESSAGES undeclared by MinGW

Including gettext.h produces an error because LC_MESSAGES is not declared
by MinGW. To solve this, the gettext.h file isn't included on MinGW and
the missing functions are manually declared.

9 years agoInclude winsock2.h before windows.h to please the compiler
Frederic Marchal [Thu, 5 Mar 2015 14:29:14 +0000 (15:29 +0100)] 
Include winsock2.h before windows.h to please the compiler

windows.h display a warning if winsock2.h isn't included first.

9 years agoList the header files in cmake
Frederic Marchal [Thu, 5 Mar 2015 14:28:12 +0000 (15:28 +0100)] 
List the header files in cmake

QtCreator needs the header files to be listed in the source variable to
display them in its project tree when the cmake project is imported.

9 years agomkdir is really a mess on MinGW
Frederic Marchal [Thu, 5 Mar 2015 14:26:52 +0000 (15:26 +0100)] 
mkdir is really a mess on MinGW

mkdir with one argument produces an error as the macro requires two
arguments. I couldn't find which macro it is!

mkdir with two arguments doesn't work as _mkdir isn't defined without
direct.h.

_mkdir isn't defined without direct.h and direct.h cannot be included
unless NO_OLDNAMES is defined to mask the mkdir macro which conflict with
the definition in io.h.

9 years agoReplace bzero by memset
Frederic Marchal [Thu, 5 Mar 2015 14:20:17 +0000 (15:20 +0100)] 
Replace bzero by memset

That function isn't available on MinGW.