|
@@ -232,11 +232,9 @@ static int t_cancel_branches(struct sip_msg* msg, char *k, char *s2)
|
|
switch(n) {
|
|
switch(n) {
|
|
case 1:
|
|
case 1:
|
|
LOCK_REPLIES(t);
|
|
LOCK_REPLIES(t);
|
|
- _tmx_tmb.which_cancel(t, &cb);
|
|
|
|
- if(t->uac[idx].local_cancel.buffer==BUSY_BUFFER)
|
|
|
|
- t->uac[idx].local_cancel.buffer=NULL;
|
|
|
|
|
|
+ /* prepare cancel for every branch except idx */
|
|
|
|
+ _tmx_tmb.prepare_to_cancel(t, &cb, 1<<idx);
|
|
UNLOCK_REPLIES(t);
|
|
UNLOCK_REPLIES(t);
|
|
- cb &= ~(1<<idx);
|
|
|
|
case 2:
|
|
case 2:
|
|
if(msg->first_line.u.reply.statuscode>=200)
|
|
if(msg->first_line.u.reply.statuscode>=200)
|
|
break;
|
|
break;
|
|
@@ -244,10 +242,12 @@ static int t_cancel_branches(struct sip_msg* msg, char *k, char *s2)
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
LOCK_REPLIES(t);
|
|
LOCK_REPLIES(t);
|
|
- _tmx_tmb.which_cancel(t, &cb);
|
|
|
|
- UNLOCK_REPLIES(t);
|
|
|
|
if (msg->first_line.u.reply.statuscode>=200)
|
|
if (msg->first_line.u.reply.statuscode>=200)
|
|
- cb &= ~(1<<idx);
|
|
|
|
|
|
+ /* prepare cancel for every branch except idx */
|
|
|
|
+ _tmx_tmb.prepare_to_cancel(t, &cb, 1<<idx);
|
|
|
|
+ else
|
|
|
|
+ _tmx_tmb.prepare_to_cancel(t, &cb, 0);
|
|
|
|
+ UNLOCK_REPLIES(t);
|
|
}
|
|
}
|
|
LM_DBG("canceling %d/%d\n", n, (int)cb);
|
|
LM_DBG("canceling %d/%d\n", n, (int)cb);
|
|
if(cb==0)
|
|
if(cb==0)
|