X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/fde026c507b6562245d6d2495742c56d181cb3b4..d7026c509f7a7ff0383689789f2e0b5b1fcc9b59:/projects/stargazer/plugins/other/rscript/rscript.cpp diff --git a/projects/stargazer/plugins/other/rscript/rscript.cpp b/projects/stargazer/plugins/other/rscript/rscript.cpp index 3a557a30..9e560a5d 100644 --- a/projects/stargazer/plugins/other/rscript/rscript.cpp +++ b/projects/stargazer/plugins/other/rscript/rscript.cpp @@ -36,6 +36,7 @@ #include "stg/locker.h" #include "stg/user_property.h" #include "stg/plugin_creator.h" +#include "stg/logger.h" #include "rscript.h" #include "ur_functor.h" #include "send_functor.h" @@ -149,13 +150,14 @@ subnetFile = pvi->value[0]; NRMapParser nrMapParser; -if (nrMapParser.ReadFile(subnetFile)) +if (!nrMapParser.ReadFile(subnetFile)) { - errorStr = nrMapParser.GetErrorStr(); - return -1; + netRouters = nrMapParser.GetMap(); + } +else + { + GetStgLogger()("mod_rscript: error opening subnets file '%s'", subnetFile.c_str()); } - -netRouters = nrMapParser.GetMap(); return 0; }