diff --git a/pandora_agents/win32/ChangeLog b/pandora_agents/win32/ChangeLog index fa21f2f402..8765af9bc3 100644 --- a/pandora_agents/win32/ChangeLog +++ b/pandora_agents/win32/ChangeLog @@ -1,3 +1,9 @@ +2012-01-30 Ramon Novoa + + * modules/pandora_module_regexp.cc: Do not open the file in the + constructor to avoid trouble if other modules modify it before + the regexp module runs. + 2012-01-19 Ramon Novoa * modules/pandora_module_odbc.cc: Check for NULL pointers. diff --git a/pandora_agents/win32/modules/pandora_module_regexp.cc b/pandora_agents/win32/modules/pandora_module_regexp.cc index 663ad11fb1..2b5778cca4 100755 --- a/pandora_agents/win32/modules/pandora_module_regexp.cc +++ b/pandora_agents/win32/modules/pandora_module_regexp.cc @@ -47,12 +47,10 @@ Pandora_Module_Regexp::Pandora_Module_Regexp (string name, string source, string pandoraLog ("Invalid regular expression %s", pattern.c_str ()); } - // Open the file and skip to the end + // Check whether the file can be opened this->file.open (source.c_str ()); if (this->file.is_open ()) { - if (no_seek_eof == 0) { - this->file.seekg (0, ios_base::end); - } + this->file.close (); } else { pandoraLog ("Error opening file %s", source.c_str ()); }