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

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Wed Jul  9 20:48:17 2014 +0200

more log info on failed CANCELing transactions

---

 core/sip/trans_layer.cpp |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/core/sip/trans_layer.cpp b/core/sip/trans_layer.cpp
index 72b8e70..024d13e 100644
--- a/core/sip/trans_layer.cpp
+++ b/core/sip/trans_layer.cpp
@@ -1406,8 +1406,8 @@ int _trans_layer::cancel(trans_ticket* tt, const cstring& 
dialog_id,
     }
 
     if(!t){
-       DBG("No transaction to cancel: wrong key or finally replied\n");
        bucket->unlock();
+       DBG("No transaction to cancel: wrong key or finally replied\n");
        return 0;
     }
 
@@ -1416,8 +1416,10 @@ int _trans_layer::cancel(trans_ticket* tt, const 
cstring& dialog_id,
     // RFC 3261 says: SHOULD NOT be sent for other request
     // than INVITE.
     if(req->u.request->method != sip_request::INVITE){
+       t->dump();
        bucket->unlock();
-       ERROR("Trying to cancel a non-INVITE request (we SHOULD NOT do 
that)\n");
+       ERROR("Trying to cancel a non-INVITE request (we SHOULD NOT do that); 
inv_cseq: %u, i:%.*s\n",
+             inv_cseq, dialog_id.len,dialog_id.s);
        return -1;
     }
     
@@ -1439,8 +1441,10 @@ int _trans_layer::cancel(trans_ticket* tt, const 
cstring& dialog_id,
     }
 
     case TS_COMPLETED:
+       ERROR("Trying to cancel a request while in TS_COMPLETED state; 
inv_cseq: %u, i:%.*s\n",
+             inv_cseq, dialog_id.len,dialog_id.s);
+       t->dump();
        bucket->unlock();
-       ERROR("Trying to cancel a request while in TS_COMPLETED state\n");
        return -1;
        
     case TS_PROCEEDING:
@@ -1449,8 +1453,10 @@ int _trans_layer::cancel(trans_ticket* tt, const 
cstring& dialog_id,
        break;
 
     default:
+       ERROR("Trying to cancel a request while in %s state; inv_cseq: %u, 
i:%.*s\n",
+             t->state_str(), inv_cseq, dialog_id.len,dialog_id.s);
+       t->dump();
        bucket->unlock();
-       ERROR("Trying to cancel a request while in unknown state\n");
        return -1;
     }
 

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

Reply via email to