From db7b9b78524bcdd1f2a5d82c1696bcd2f96d9491 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Sat, 19 May 2012 20:13:38 +0300 Subject: [PATCH] Allow to start mod_rscript without subnets file --- projects/stargazer/plugins/other/rscript/rscript.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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; } -- 2.43.2