X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Ftesting%2FTestStep.cpp;h=07ed685e44efd3dbc38c34e8a33b6bc492987a7b;hb=2dc559e7fbe3f250f5aff1a23614181fc0b2e7f1;hp=810565bf0f5222cc000833f0834e15c4fdf52e54;hpb=1ac015cbbcd331edc3c14de26290d669d91e4e53;p=anna.git diff --git a/example/diameter/launcher/testing/TestStep.cpp b/example/diameter/launcher/testing/TestStep.cpp index 810565b..07ed685 100644 --- a/example/diameter/launcher/testing/TestStep.cpp +++ b/example/diameter/launcher/testing/TestStep.cpp @@ -177,10 +177,14 @@ void TestStep::initialize(TestCase *testCase) { a_number = testCase->steps() + 1; // testCase is not NULL } -bool TestStep::decodeMessage() throw() { +bool TestStep::decodeMessage(bool trust) throw() { if (a_messageCodec) return true; a_messageCodec = new anna::diameter::codec::Message; if (::decodeMessage(a_message, *a_messageCodec)) return true; + if (trust) { + LOGDEBUG(anna::Logger::debug("Error DECODING, but trusting it ...", ANNA_FILE_LOCATION)); + return true; + } delete a_messageCodec; a_messageCodec = NULL; @@ -413,7 +417,7 @@ bool TestStepSendxml::do_execute() throw() { // Detailed log: if(a_originHost->logEnabled()) { - if (decodeMessage()) { + if (decodeMessage(true /* trust */)) { std::string detail = usedClientSession ? usedClientSession->asString() : ""; // shouldn't happen a_originHost->writeLogFile(*a_messageCodec, (success ? "sent2e" : "send2eError"), detail); } @@ -447,7 +451,7 @@ bool TestStepSendxml::do_execute() throw() { // Detailed log: if(a_originHost->logEnabled()) { - if (decodeMessage()) { + if (decodeMessage(true /* trust */)) { std::string detail = usedServerSession ? usedServerSession->asString() : ""; // shouldn't happen a_originHost->writeLogFile(*a_messageCodec, (success ? "sent2c" : "send2cError"), detail); }