diff --git a/core/plug-in/stats/StatsUDPServer.cpp b/core/plug-in/stats/StatsUDPServer.cpp index f75df71a..bebb589a 100644 --- a/core/plug-in/stats/StatsUDPServer.cpp +++ b/core/plug-in/stats/StatsUDPServer.cpp @@ -291,7 +291,10 @@ int StatsUDPServer::execute(char* msg_buf, string& reply, } try { - AmArgArray args; + // args need to be stored in string vector, + // because stl copyconstructor does not copy + // underlying c_str + vector s_args; while (p::iterator it = s_args.begin(); + it != s_args.end(); it++) { + args.push(it->c_str()); +// DBG("mod '%s' added arg a '%s'\n", +// fact_name.c_str(), +// it->c_str()); + } + AmDynInvokeFactory* di_f = AmPlugIn::instance()->getFactory4Di(fact_name); if(!di_f){ reply = "could not get '" + fact_name + "' factory\n";