Removed debug information, fixed controller, made HTTP connector auto-discover connectors.
This commit is contained in:
parent
221cd15b07
commit
a254fe7195
8 changed files with 110 additions and 85 deletions
|
@ -249,7 +249,6 @@ int main(int argc, char ** argv){
|
|||
char const * conn_args[] = {0, "-j", 0};
|
||||
for (std::deque<std::string>::iterator it = execs.begin(); it != execs.end(); it++){
|
||||
if ((*it).substr(0, 8) == "MistConn"){
|
||||
std::cout << "Exec: '" << (*it) << "'" << std::endl;
|
||||
arg_one = Util::getMyPath() + (*it);
|
||||
conn_args[0] = arg_one.c_str();
|
||||
capabilities["connectors"][(*it).substr(8)] = JSON::fromString(Util::Procs::getOutputOf((char**)conn_args));
|
||||
|
@ -258,9 +257,6 @@ int main(int argc, char ** argv){
|
|||
}
|
||||
}
|
||||
}
|
||||
std::cout << capabilities.toPrettyString() << std::endl;
|
||||
|
||||
|
||||
|
||||
createAccount(conf.getString("account"));
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace Controller {
|
|||
|
||||
|
||||
static inline std::string toConn(long long i){
|
||||
return std::string("Conn") + JSON::Value(i).asStringRef();
|
||||
return std::string("Conn") + JSON::Value(i).asString();
|
||||
}
|
||||
|
||||
///\brief Checks if the binary mentioned in the protocol argument is currently active, if so, restarts it.
|
||||
|
@ -71,12 +71,6 @@ namespace Controller {
|
|||
JSON::Value & pipedCapa = capabilities["connectors"][p["connector"].asStringRef()];
|
||||
if (pipedCapa.isMember("required")){builPipedPart(p, argarr, argnum, pipedCapa["required"]);}
|
||||
if (pipedCapa.isMember("optional")){builPipedPart(p, argarr, argnum, pipedCapa["optional"]);}
|
||||
for (int i = 0; i < argnum; ++i){
|
||||
if (argarr[i] > 0){
|
||||
std::cerr << argarr[i] << " ";
|
||||
}
|
||||
}
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
|
||||
///\brief Checks current protocol coguration, updates state of enabled connectors if neccesary.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue