diff --git a/core/SipCtrlInterface.cpp b/core/SipCtrlInterface.cpp index 2a339a08..af90311c 100644 --- a/core/SipCtrlInterface.cpp +++ b/core/SipCtrlInterface.cpp @@ -416,14 +416,14 @@ int SipCtrlInterface::send(const AmSipReply &rep, const string& dialog_id, } -inline bool SipCtrlInterface::sip_msg2am_request(const sip_msg *msg, +inline bool SipCtrlInterface::sip_msg2am_request(const sip_msg *msg, const trans_ticket& tt, AmSipRequest &req) { assert(msg); assert(msg->from && msg->from->p); assert(msg->to && msg->to->p); - + req.method = c2stlstr(msg->u.request->method_str); req.user = c2stlstr(msg->u.request->ruri.user); req.domain = c2stlstr(msg->u.request->ruri.host); diff --git a/core/sip/sip_trans.cpp b/core/sip/sip_trans.cpp index a5890cef..7f5b2a6e 100644 --- a/core/sip/sip_trans.cpp +++ b/core/sip/sip_trans.cpp @@ -84,7 +84,7 @@ sip_trans::sip_trans() { } -sip_trans::~sip_trans() +sip_trans::~sip_trans() { reset_all_timers(); delete msg; diff --git a/core/sip/sip_trans.h b/core/sip/sip_trans.h index 420f2019..0fe5b19c 100644 --- a/core/sip/sip_trans.h +++ b/core/sip/sip_trans.h @@ -137,7 +137,7 @@ class sip_trans /** Destination list for requests */ sip_target_set* targets; - + /** * Retransmission buffer * - UAC transaction: ACK diff --git a/core/sip/trans_layer.cpp b/core/sip/trans_layer.cpp index 973701f4..861a536f 100644 --- a/core/sip/trans_layer.cpp +++ b/core/sip/trans_layer.cpp @@ -638,7 +638,7 @@ int trans_layer::send_reply(sip_msg* msg, const trans_ticket* tt, if (!dialog_id.empty() && t->dialog_id.empty()) { t->dialog_id = dialog_id; } - + end: bucket->unlock(); return err; @@ -666,8 +666,8 @@ int trans_layer::send_sf_error_reply(const trans_ticket* tt, const sip_msg* req, return send_reply(&reply, tt, "", to_tag); } -int trans_layer::send_sl_reply(sip_msg* req, int reply_code, - const cstring& reason, const cstring& hdrs, +int trans_layer::send_sl_reply(sip_msg* req, int reply_code, + const cstring& reason, const cstring& hdrs, const cstring& body) { // Ref.: RFC 3261 8.2.6, 12.1.1 @@ -1379,7 +1379,7 @@ int trans_layer::send_request(sip_msg* msg, trans_ticket* tt, } tt->_bucket->unlock(); - + return err; } @@ -1447,7 +1447,7 @@ int trans_layer::cancel(trans_ticket* tt, const string& dialog_id, t->dump(); bucket->unlock(); return -1; - + case TS_PROCEEDING: case TS_ABANDONED: // continue with CANCEL request @@ -1706,14 +1706,14 @@ void trans_layer::process_rcvd_msg(sip_msg* msg) } } break; - + case SIP_REPLY: stats.inc_received_replies(); if((t = bucket->match_reply(msg)) != NULL){ // Reply matched UAC transaction - + DBG("Reply matched an existing transaction\n"); if(t->logger && msg->local_socket && msg->buf && msg->len) { @@ -1808,7 +1808,7 @@ int trans_layer::update_uac_reply(trans_bucket* bucket, sip_trans* t, sip_msg* m // send CANCEL trans_ticket tt(t,bucket); cancel(&tt, "", 0, cstring()); - + // Now remove the transaction bucket->lock(); //bucket->remove(t); @@ -2384,7 +2384,7 @@ void trans_layer::timer_expired(trans_timer* t, trans_bucket* bucket, // send CANCEL trans_ticket tt(tr,bucket); cancel(&tt, "", 0, cstring()); - + // Now remove the transaction bucket->lock(); if(bucket->exist(tr)) { @@ -2605,7 +2605,7 @@ sip_trans* trans_layer::copy_uac_trans(sip_trans* tr) { assert(tr && (tr->type == TT_UAC)); sip_trans* n_tr = new sip_trans(); - + n_tr->type = tr->type; n_tr->flags = tr->flags; diff --git a/core/sip/trans_table.cpp b/core/sip/trans_table.cpp index 10aba1d8..4c7b3059 100644 --- a/core/sip/trans_table.cpp +++ b/core/sip/trans_table.cpp @@ -383,7 +383,7 @@ sip_trans* trans_bucket::match_1xx_prack(sip_msg* msg) sip_from_to* to = dynamic_cast(msg->to->p); if(!to || to->tag.len != t->to_tag.len) continue; - + if(msg->callid->value.len != t->msg->callid->value.len) continue; @@ -391,21 +391,21 @@ sip_trans* trans_bucket::match_1xx_prack(sip_msg* msg) sip_cseq* t_cseq = dynamic_cast(t->msg->cseq->p); if (!rack || !t_cseq || rack->cseq != t_cseq->num) continue; - + if (rack->rseq != t->last_rseq) continue; - + if (rack->method != t->msg->u.request->method) continue; - + /* numbers fit, try content */ if(memcmp(from->tag.s,t_from->tag.s,from->tag.len)) continue; - + if(memcmp(msg->callid->value.s,t->msg->callid->value.s, msg->callid->value.len)) continue; - + if(memcmp(to->tag.s,t->to_tag.s,to->tag.len)) continue; @@ -423,10 +423,10 @@ sip_trans* trans_bucket::find_uac_trans(const string& dialog_id, if(elmts.empty()) return NULL; - + trans_list::reverse_iterator it = elmts.rbegin(); for(;it!=elmts.rend();++it) { - + sip_trans* t = *it; if( t->type != TT_UAC || t->msg->type != SIP_REQUEST ){