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

Author: Raphael Coeffic <[email protected]>
Committer: Raphael Coeffic <[email protected]>
Date:   Thu Jul  8 16:01:03 2010 +0200

do not remove the transaction while cancelling in TS_CALLING state 

---

 core/sip/trans_layer.cpp |   19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/core/sip/trans_layer.cpp b/core/sip/trans_layer.cpp
index ba0550e..0296a05 100644
--- a/core/sip/trans_layer.cpp
+++ b/core/sip/trans_layer.cpp
@@ -871,25 +871,22 @@ int trans_layer::cancel(trans_ticket* tt)
     
     switch(t->state){
     case TS_CALLING:
-       // do not send a request:
-       // just remove the transaction
-       bucket->remove_trans(t);
        bucket->unlock();
-       return 0;
+       ERROR("Trying to cancel a request while in TS_CALLING state.\n");
+       return -1;
 
     case TS_COMPLETED:
-       // final reply has been sent, but still no ACK:
-       // do nothing!!!
-
-       // TODO: switch to TS_CANCELLING??
-       // this would allow for sending the BYE as soon
-       // we get an ACK or a timeout (STIMER_H)...
        bucket->unlock();
-       return 0;
+       ERROR("Trying to cancel a request while in TS_COMPLETED state\n");
+       return -1;
        
     case TS_PROCEEDING:
        // continue with CANCEL request
        break;
+
+    default:
+       assert(0);
+       break;
     }
 
     cstring cancel_str("CANCEL");

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

Reply via email to