Module: sems Branch: 1.4 Commit: cc57a0886feca69db61e0154887ec65014149910 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=cc57a0886feca69db61e0154887ec65014149910
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Fri May 6 10:30:37 2011 +0200 b/f: do not update route or remote_uri on failure reply. --- core/AmSipDialog.cpp | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp index e97e20a..753d815 100644 --- a/core/AmSipDialog.cpp +++ b/core/AmSipDialog.cpp @@ -323,21 +323,23 @@ void AmSipDialog::updateStatus(const AmSipReply& reply) // responses to INVITE if ( (reply.code > 100) - && (reply.code < 300) - && !reply.remote_tag.empty() + && (reply.code < 300) { + + if(!reply.remote_tag.empty() && (remote_tag.empty() || ((status < Connected) && (reply.code >= 200))) ) { - remote_tag = reply.remote_tag; - } + remote_tag = reply.remote_tag; + } - // allow route overwriting - if ((status < Connected) && !reply.route.empty()) { + // allow route overwriting + if ((status < Connected) && !reply.route.empty()) { route = reply.route; - } + } - if (reply.next_request_uri.length()) - remote_uri = reply.next_request_uri; + if (reply.next_request_uri.length()) + remote_uri = reply.next_request_uri; + } switch(status){ case Disconnecting: _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
