@@ -126,14 +126,14 @@ namespace Controller{
126126 }
127127
128128 static inline void buildPipedArguments (JSON::Value &p, char *argarr[], const JSON::Value &capabilities){
129- int argnum = 0 ;
129+ int argnum = 1 ;
130130 static std::string tmparg;
131- tmparg = Util::getMyPath () + std::string (" MistOut" ) + p[" connector" ].asStringRef ();
132- struct stat buf;
133- if (::stat (tmparg.c_str (), &buf) != 0 ){
134- tmparg = Util::getMyPath () + std::string (" MistConn" ) + p[" connector" ].asStringRef ();
135- }
136- if (::stat (tmparg.c_str (), &buf) != 0 ){return ;}
131+ tmparg = std::string (" MistOut" ) + p[" connector" ].asStringRef ();
132+ // struct stat buf;
133+ // if (::stat(tmparg.c_str(), &buf) != 0){
134+ // tmparg = Util::getMyPath() + std::string("MistConn") + p["connector"].asStringRef();
135+ // }
136+ // if (::stat(tmparg.c_str(), &buf) != 0){return;}
137137 argarr[argnum++] = (char *)tmparg.c_str ();
138138 const JSON::Value &pipedCapa = capabilities[" connectors" ][p[" connector" ].asStringRef ()];
139139 if (pipedCapa.isMember (" required" )){builPipedPart (p, argarr, argnum, pipedCapa[" required" ]);}
@@ -160,7 +160,7 @@ namespace Controller{
160160
161161 // used for building args
162162 int err = fileno (stderr);
163- char *argarr[15 ] ; // approx max # of args (with a wide margin)
163+ char *argarr[16 ] = { " /home/iameli/code/mistserver/build/MistServer " } ; // approx max # of args (with a wide margin)
164164 int i;
165165
166166 std::string tmp;
@@ -255,11 +255,12 @@ namespace Controller{
255255 Log (" CONF" , " Starting connector: " + *runningConns.begin ());
256256 action = true ;
257257 // clear out old args
258- for (i = 0 ; i < 15 ; i++){argarr[i] = 0 ;}
258+ for (i = 1 ; i < 16 ; i++){argarr[i] = 0 ;}
259259 // get args for this connector
260260 JSON::Value p = JSON::fromString (*runningConns.begin ());
261261 buildPipedArguments (p, (char **)&argarr, capabilities);
262262 // start piped w/ generated args
263+ INFO_MSG (" piped command[0]: %s [1]: %s" , argarr[0 ], argarr[1 ])
263264 currentConnectors[*runningConns.begin ()] = Util::Procs::StartPiped (argarr, 0 , 0 , &err);
264265 Triggers::doTrigger (" OUTPUT_START" , *runningConns.begin ()); // LTS
265266 }
0 commit comments