Module: kamailio Branch: master Commit: 785a3ccc743f429107c3dfae78d43705918aa4e6 URL: https://github.com/kamailio/kamailio/commit/785a3ccc743f429107c3dfae78d43705...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2017-11-09T15:54:46+01:00
tm: run TMCB_RESPONSE_OUT callback only if the response code is still the active one
---
Modified: src/modules/tm/t_reply.c
---
Diff: https://github.com/kamailio/kamailio/commit/785a3ccc743f429107c3dfae78d43705... Patch: https://github.com/kamailio/kamailio/commit/785a3ccc743f429107c3dfae78d43705...
---
diff --git a/src/modules/tm/t_reply.c b/src/modules/tm/t_reply.c index 7cac44ede2..e6bc4dbff1 100644 --- a/src/modules/tm/t_reply.c +++ b/src/modules/tm/t_reply.c @@ -1978,8 +1978,10 @@ enum rps relay_reply( struct cell *t, struct sip_msg *p_msg, int branch, if (unlikely(!totag_retr && has_tran_tmcbs(t, TMCB_RESPONSE_OUT))){ LOCK_REPLIES( t ); - run_trans_callbacks_with_buf( TMCB_RESPONSE_OUT, uas_rb, - t->uas.request, relayed_msg, TMCB_NONE_F); + if(relayed_msg->REPLY_STATUS==uas_rb->activ_type) { + run_trans_callbacks_with_buf( TMCB_RESPONSE_OUT, uas_rb, + t->uas.request, relayed_msg, TMCB_NONE_F); + } UNLOCK_REPLIES( t ); } if (unlikely(has_tran_tmcbs(t, TMCB_RESPONSE_SENT))){