From: Eduardo Ramos Testillano Date: Wed, 8 Apr 2015 01:26:19 +0000 (+0200) Subject: Change # per , and do complete depth validation X-Git-Tag: REFACTORING_TESTING_LIBRARY~179 X-Git-Url: https://git.teslayout.com/public/public/public/?a=commitdiff_plain;h=92cdf7810c5eceb4efe27d70d27800b4582d8b3c;p=anna.git Change # per , and do complete depth validation --- diff --git a/example/diameter/pcapDecoder/main.cpp b/example/diameter/pcapDecoder/main.cpp index cfa6c5f..6b2e945 100644 --- a/example/diameter/pcapDecoder/main.cpp +++ b/example/diameter/pcapDecoder/main.cpp @@ -350,8 +350,8 @@ int main(int argc, char **argv) { if(argc < 3) { std::string msg = "Usage: "; msg += exec; msg += " [--no-validation] [--ignore-flags]\n\n"; - msg += " stacks: \n"; - msg += " This is a list of comma-separated stacks defined by a #-separated pair \n"; + msg += " stacks: \n"; + msg += " This is a list of #-separated stacks defined by a comma-separated pair \n"; msg += " If only one stack is provided, application-id could be omitted and then, all the messages will be decoded with the\n"; msg += " dictionary regardless the value of the application-id (the stack will be registered with id=0).\n"; msg += " Input file: normally a pcap file, but hexadecimal content (colons allowed) can also be decoded (use '.hex' extension).\n"; @@ -381,13 +381,13 @@ int main(int argc, char **argv) { // Register stacks: try { anna::Tokenizer stacksTok; - stacksTok.apply(stacks, ","); + stacksTok.apply(stacks, "#"); anna::Tokenizer::const_iterator stacks_it, stack_it; for(stacks_it = stacksTok.begin(); stacks_it != stacksTok.end(); stacks_it++) { std::string stack = anna::Tokenizer::data(stacks_it); anna::Tokenizer stackTok; - stackTok.apply(stack, "#"); + stackTok.apply(stack, ","); if(stackTok.size() == 1) { if(stacksTok.size() != 1) @@ -420,6 +420,7 @@ int main(int argc, char **argv) { } // Validation kindness + e_codecEngine->setValidationDepth(anna::diameter::codec::EngineImpl::ValidationDepth::Complete); // complete validation for better reports if(no_validation) G_codecEngine->setValidationMode(anna::diameter::codec::EngineImpl::ValidationMode::Never); if(ignore_flags) G_codecEngine->ignoreFlagsOnValidation(true);