From: Frédéric Marchal Date: Sun, 26 Aug 2012 13:53:52 +0000 (+0200) Subject: Extract the covered period from the sarg log file X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db3dd1149ba26f8611e52190483da92d5895cd4f;p=thirdparty%2Fsarg.git Extract the covered period from the sarg log file A sarg log file is named after the covered date range. The range is extracted and used in the report. --- diff --git a/readlog_sarg.c b/readlog_sarg.c index ed93dfc..106f4c3 100644 --- a/readlog_sarg.c +++ b/readlog_sarg.c @@ -36,6 +36,10 @@ A new file is being read. The name of the file is \a FileName. static void Sarg_NewFile(const char *FileName) { InSargLog=false; + if (getperiod_fromsarglog(FileName,&period)<0) { + debuga(_("The name of the file is invalid: %s\n"),FileName); + exit(EXIT_FAILURE); + } } /*!