From b7666d99eecbb40d36427c9f3b33cc68285e3d6e Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Wed, 28 Mar 2007 02:08:16 +0000 Subject: [PATCH] fixes DI invocation parameters over stats server git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@283 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/plug-in/stats/StatsUDPServer.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) 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";