Module: sip-router Branch: master Commit: 2e426419ab2f3f15adc4a50de6efe3bb06dc77b8 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2e426419...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Tue Jul 19 19:41:20 2011 +0200
tm: be sure branch PV is set when t_check_trans() is used for reply
- reported by Alex Hermann, FS#117
---
modules/tm/tm.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/modules/tm/tm.c b/modules/tm/tm.c index 096e30c..baf2d81 100644 --- a/modules/tm/tm.c +++ b/modules/tm/tm.c @@ -1937,12 +1937,17 @@ int w_t_reply_wrp(struct sip_msg *m, unsigned int code, char *txt) int t_check_trans(struct sip_msg* msg) { struct cell* t; + int branch; + int ret; - if (msg->first_line.type==SIP_REPLY) - return w_t_check(msg, 0 ,0); - else if (msg->REQ_METHOD==METHOD_CANCEL) + if (msg->first_line.type==SIP_REPLY) { + branch = 0; + ret = (t_check_msg( msg , &branch)==1) ? 1 : -1; + tm_ctx_set_branch_index(branch); + return ret; + } else if (msg->REQ_METHOD==METHOD_CANCEL) { return w_t_lookup_cancel(msg, 0, 0); - else{ + } else { switch(t_check_msg(msg, 0)){ case -2: /* possible e2e ack */ return 1;