//! \c True if the current log is known to be a sarg parsed log.
static bool InSargLog=false;
+//! \c True if the file name is invalid.
+static bool InvalidFileName=true;
/*!
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);
- }
+ InvalidFileName=(getperiod_fromsarglog(FileName,&period)<0);
}
/*!
int Second;
if (strncmp(Line,"*** SARG Log ***",16)==0) {
+ if (InvalidFileName) {
+ debuga(_("The name of the file is invalid for a sarg log\n"));
+ exit(EXIT_FAILURE);
+ }
InSargLog=true;
return(RLRC_Ignore);
}