Changeset - 46fb710fbe74
[Not reviewed]
0 1 0
Jan Kaluza - 14 years ago 2011-08-02 15:03:25
hanzz.k@gmail.com
pass BACKEND_ID
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/networkpluginserver.cpp
Show inline comments
 
@@ -47,6 +47,8 @@ using namespace log4cxx;
 

	
 
namespace Transport {
 

	
 
static unsigned long backend_id;
 

	
 
static LoggerPtr logger = Logger::getLogger("NetworkPluginServer");
 

	
 
class NetworkConversation : public Conversation {
 
@@ -94,6 +96,7 @@ class NetworkFactory : public Factory {
 
	wrap.SerializeToString(&MESSAGE);
 

	
 
static pid_t exec_(std::string path, const char *host, const char *port, const char *config) {
 
	boost::replace_all(path, "BACKEND_ID", boost::lexical_cast<std::string>(backend_id++));
 
	path += std::string(" --host ") + host + " --port " + port + " " + config;
 
	LOG4CXX_INFO(logger, "Starting new backend " << path);
 
	char *p = (char *) malloc(path.size() + 1);
0 comments (0 inline, 0 general)