Module: sems
Branch: master
Commit: 003b948ee85b59e063e1b71ba1e92fc7c029cd1d
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=003b948ee85b59e063e1b71ba1e92fc7c029cd1d

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 125bd88..3fd4efa 100644
--- a/core/AmSipDialog.cpp
+++ b/core/AmSipDialog.cpp
@@ -324,21 +324,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

Reply via email to