#include <Main/util.hxx>
#include "generic.hxx"
-FGGeneric::FGGeneric(vector<string> tokens) : exitOnError(false)
+FGGeneric::FGGeneric(vector<string> tokens) : exitOnError(false), initOk(false)
{
size_t configToken;
if (tokens[1] == "socket") {
configToken = 6;
}
- if (configToken >= tokens.size()) {
+ if ((configToken >= tokens.size())||(tokens[ configToken ] == "")) {
SG_LOG(SG_NETWORK, SG_ALERT,
- "Not enough tokens passed for generic protocol");
+ "Not enough tokens passed for generic '" << tokens[1] << "' protocol. ");
return;
}
if (direction != "in" && direction != "out" && direction != "bi") {
SG_LOG(SG_NETWORK, SG_ALERT, "Unsuported protocol direction: "
<< direction);
+ return;
}
reinit();
}
}
}
+
+ initOk = true;
}