Explorar o código

tmx: backup and restore existing T and branch pointers for t_cancel_callid()

- reported and initial patch by Guillaume Bour
Daniel-Constantin Mierla %!s(int64=11) %!d(string=hai) anos
pai
achega
60372d6135
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      modules/tmx/tmx_mod.c

+ 5 - 0
modules/tmx/tmx_mod.c

@@ -334,6 +334,8 @@ static int fixup_cancel_callid(void** param, int param_no)
 static int t_cancel_callid(struct sip_msg* msg, char *cid, char *cseq, char *flag)
 static int t_cancel_callid(struct sip_msg* msg, char *cid, char *cseq, char *flag)
 {
 {
 	struct cell *trans;
 	struct cell *trans;
+	struct cell *bkt;
+	int bkb;
 	struct cancel_info cancel_data;
 	struct cancel_info cancel_data;
 	str cseq_s;
 	str cseq_s;
 	str callid_s;
 	str callid_s;
@@ -359,6 +361,8 @@ static int t_cancel_callid(struct sip_msg* msg, char *cid, char *cseq, char *fla
 		return -1;
 		return -1;
 	}
 	}
 
 
+	bkt = _tmx_tmb.t_gett();
+	bkb = _tmx_tmb.t_gett_branch();
 	if( _tmx_tmb.t_lookup_callid(&trans, callid_s, cseq_s) < 0 ) {
 	if( _tmx_tmb.t_lookup_callid(&trans, callid_s, cseq_s) < 0 ) {
 		DBG("Lookup failed - no transaction\n");
 		DBG("Lookup failed - no transaction\n");
 		return -1;
 		return -1;
@@ -373,6 +377,7 @@ static int t_cancel_callid(struct sip_msg* msg, char *cid, char *cseq, char *fla
 	_tmx_tmb.cancel_uacs(trans, &cancel_data, 0);
 	_tmx_tmb.cancel_uacs(trans, &cancel_data, 0);
 
 
 	//_tmx_tmb.unref_cell(trans);
 	//_tmx_tmb.unref_cell(trans);
+	_tmx_tmb.t_sett(bkt, bkb);
 
 
 	return 1;
 	return 1;
 }
 }