commandLine.add("originHost", anna::CommandLine::Argument::Optional, "Diameter application host name (system name). If missing, process sets o.s. hostname");
commandLine.add("originRealm", anna::CommandLine::Argument::Optional, "Diameter application node realm name. If missing, process sets domain name");
commandLine.add("integrationAndDebugging", anna::CommandLine::Argument::Optional, "Sets validation mode to 'Always' (default validates only after decoding), and validation depth to 'Complete' (default validates until 'FirstError')", false);
-// commandLine.add("clone", anna::CommandLine::Argument::Optional, "Enables fork mode for request processing", false);
+ commandLine.add("fixMode", anna::CommandLine::Argument::Optional, "Sets message fix mode (unreconized values will assume default 'BeforeEncoding'). Allowed: 'BeforeEncoding', 'AfterDecoding', 'Always', 'Never'");
+
commandLine.initialize(argv, argc);
commandLine.verify();
std::cout << commandLine.asString() << std::endl;
codecEngine->setValidationDepth(anna::diameter::codec::Engine::ValidationDepth::Complete);
}
+ // Fix mode
+ if(cl.exists("fixMode")) { // BeforeEncoding(default), AfterDecoding, Always, Never
+ std::string fixMode = cl.getValue("fixMode");
+ anna::diameter::codec::Engine::FixMode::_v fm;
+ if (fixMode == "BeforeEncoding") fm = anna::diameter::codec::Engine::FixMode::BeforeEncoding;
+ else if (fixMode == "AfterDecoding") fm = anna::diameter::codec::Engine::FixMode::AfterDecoding;
+ else if (fixMode == "Always") fm = anna::diameter::codec::Engine::FixMode::Always;
+ else if (fixMode == "Never") fm = anna::diameter::codec::Engine::FixMode::Never;
+ else LOGINFORMATION(anna::Logger::information("Unreconized command-line fix mode. Assumed default 'BeforeEncoding'", ANNA_FILE_LOCATION));
+ codecEngine->setFixMode(fm);
+ }
+
codecEngine->ignoreFlagsOnValidation(cl.exists("ignoreFlags"));
// Diameter Server: