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

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Mon Dec 27 23:14:04 2010 +0100

b/f: reINVITEs failing once PRACK is in use

fixes issue SEMS - 55 https://bugtracker.iptel.org/view.php?id=55

patch by Thomas Gelf

---

 core/AmSipDialog.cpp |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp
index 6b4ba01..3554ee6 100644
--- a/core/AmSipDialog.cpp
+++ b/core/AmSipDialog.cpp
@@ -97,13 +97,14 @@ void AmSipDialog::updateStatus(const AmSipRequest& req)
     return;
   }
 
-  if ((req.method == "INVITE") && pending_invites) {      
-    reply_error(req,500, SIP_REPLY_SERVER_INTERNAL_ERROR,
-               "Retry-After: " + int2str(get_random() % 10) + CRLF);
-    return;
-  }
-  else {
-      pending_invites++;
+  if (req.method == "INVITE") {
+    if (pending_invites) {
+      reply_error(req,500, SIP_REPLY_SERVER_INTERNAL_ERROR,
+                 "Retry-After: " + int2str(get_random() % 10) + CRLF);
+      return;
+    }
+
+    pending_invites++;
   }
 
   r_cseq = req.cseq;

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to