From: <oja...@us...> - 2006-09-21 19:52:01
|
Revision: 43 http://svn.sourceforge.net/sipp/?rev=43&view=rev Author: ojacques Date: 2006-09-21 12:51:53 -0700 (Thu, 21 Sep 2006) Log Message: ----------- Fixed breakage for handling unexpected messages (eg 404 instead of 200) - provided by F. Tarek Rogers Modified Paths: -------------- sipp/trunk/call.cpp Modified: sipp/trunk/call.cpp =================================================================== --- sipp/trunk/call.cpp 2006-09-14 13:52:03 UTC (rev 42) +++ sipp/trunk/call.cpp 2006-09-21 19:51:53 UTC (rev 43) @@ -2542,21 +2542,22 @@ search_index >= 0; search_index--) { if (scenario[search_index]->optional == OPTIONAL_FALSE) contig = false; - if(MATCHES_SCENARIO(search_index) && - (contig || scenario[search_index]->optional == OPTIONAL_GLOBAL)) { + if(MATCHES_SCENARIO(search_index)) { + if (contig || scenario[search_index]->optional == OPTIONAL_GLOBAL) { found = true; break; - } else { - /* - * we received a non mandatory msg for an old transaction (this could be due to a retransmit. - * If this response is for an INVITE transaction, retransmit the ACK to quench retransmits. - */ - if ( (reply_code) && + } else { + /* + * we received a non mandatory msg for an old transaction (this could be due to a retransmit. + * If this response is for an INVITE transaction, retransmit the ACK to quench retransmits. + */ + if ( (reply_code) && (0 == strncmp (responsecseqmethod, "INVITE", strlen(responsecseqmethod)) ) && (scenario[search_index+1]->M_type == MSG_TYPE_SEND) && (0 == strncmp(scenario[search_index+1]->send_scheme, "ACK", 3)) ) { - sendBuffer(createSendingMessage(scenario[search_index+1] -> send_scheme, (search_index+1))); - return true; + sendBuffer(createSendingMessage(scenario[search_index+1] -> send_scheme, (search_index+1))); + return true; + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |