Module: kamailio
Branch: master
Commit: 33302f87cb2bd8b94a1e338d8a3171a41a055bf2
URL:
https://github.com/kamailio/kamailio/commit/33302f87cb2bd8b94a1e338d8a3171a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-09T14:55:47+01:00
tm: use define for unset flags of run_trans_callbacks_with_buf()
---
Modified: src/modules/tm/t_append_branches.c
Modified: src/modules/tm/t_fwd.c
Modified: src/modules/tm/t_hooks.h
Modified: src/modules/tm/t_reply.c
---
Diff:
https://github.com/kamailio/kamailio/commit/33302f87cb2bd8b94a1e338d8a3171a…
Patch:
https://github.com/kamailio/kamailio/commit/33302f87cb2bd8b94a1e338d8a3171a…
---
diff --git a/src/modules/tm/t_append_branches.c b/src/modules/tm/t_append_branches.c
index 9477f8f6b0..7ec2008ffa 100644
--- a/src/modules/tm/t_append_branches.c
+++ b/src/modules/tm/t_append_branches.c
@@ -189,7 +189,7 @@ int t_append_branches(void) {
if (unlikely(has_tran_tmcbs(t, TMCB_REQUEST_OUT)))
run_trans_callbacks_with_buf( TMCB_REQUEST_OUT,
&t->uac[nr_branches].request,
- faked_req, 0, -orig_msg->REQ_METHOD);
+ faked_req, 0, TMCB_NONE_F);
}
else /* new branch added */
added_branches |= 1<<branch_ret;
diff --git a/src/modules/tm/t_fwd.c b/src/modules/tm/t_fwd.c
index df9eef4f49..4ebafee167 100644
--- a/src/modules/tm/t_fwd.c
+++ b/src/modules/tm/t_fwd.c
@@ -1585,7 +1585,7 @@ int t_send_branch( struct cell *t, int branch, struct sip_msg* p_msg
,
} else {
if (unlikely(has_tran_tmcbs(t, TMCB_REQUEST_SENT)))
run_trans_callbacks_with_buf(TMCB_REQUEST_SENT, &uac->request,
- p_msg, 0,0);
+ p_msg, 0, TMCB_NONE_F);
/* start retr. only if the send succeeded */
if (start_retr( &uac->request )!=0){
LM_CRIT("BUG: retransmission already started for: %p\n",
@@ -1754,7 +1754,7 @@ int t_forward_nonack( struct cell *t, struct sip_msg* p_msg,
if (unlikely(has_tran_tmcbs(t, TMCB_REQUEST_OUT)))
run_trans_callbacks_with_buf( TMCB_REQUEST_OUT,
&t->uac[i].request,
- p_msg, 0, -p_msg->REQ_METHOD);
+ p_msg, 0, TMCB_NONE_F);
}
else /* new branch added */
added_branches |= 1<<branch_ret;
diff --git a/src/modules/tm/t_hooks.h b/src/modules/tm/t_hooks.h
index f002a008d0..3e133f38cf 100644
--- a/src/modules/tm/t_hooks.h
+++ b/src/modules/tm/t_hooks.h
@@ -328,6 +328,7 @@ struct cell;
).
*/
+#define TMCB_NONE_F 0
#define TMCB_RETR_F 1
#define TMCB_LOCAL_F 2
diff --git a/src/modules/tm/t_reply.c b/src/modules/tm/t_reply.c
index 355f4d2e7e..7cac44ede2 100644
--- a/src/modules/tm/t_reply.c
+++ b/src/modules/tm/t_reply.c
@@ -515,7 +515,7 @@ static int _reply_light( struct cell *trans, char* buf, unsigned int
len,
} else {
if(unlikely(has_tran_tmcbs(trans, TMCB_RESPONSE_READY))) {
run_trans_callbacks_with_buf(TMCB_RESPONSE_READY, rb,
- trans->uas.request, FAKED_REPLY, code);
+ trans->uas.request, FAKED_REPLY, TMCB_NONE_F);
}
}
cleanup_uac_timers( trans );
@@ -532,7 +532,7 @@ static int _reply_light( struct cell *trans, char* buf, unsigned int
len,
if (code==100) {
if(unlikely(has_tran_tmcbs(trans, TMCB_REQUEST_PENDING)))
run_trans_callbacks_with_buf(TMCB_REQUEST_PENDING, rb,
- trans->uas.request, FAKED_REPLY, code);
+ trans->uas.request, FAKED_REPLY, TMCB_NONE_F);
}
/* send it out */
@@ -1946,7 +1946,7 @@ enum rps relay_reply( struct cell *t, struct sip_msg *p_msg, int
branch,
if (relay >= 0) {
if (unlikely(!totag_retr && has_tran_tmcbs(t, TMCB_RESPONSE_READY))){
run_trans_callbacks_with_buf(TMCB_RESPONSE_READY, uas_rb,
- t->uas.request, relayed_msg, relayed_code);
+ t->uas.request, relayed_msg, TMCB_NONE_F);
}
/* Set retransmission timer before the reply is sent out to avoid
* race conditions
@@ -1979,7 +1979,7 @@ enum rps relay_reply( struct cell *t, struct sip_msg *p_msg, int
branch,
&& 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, relayed_code);
+ t->uas.request, relayed_msg, TMCB_NONE_F);
UNLOCK_REPLIES( t );
}
if (unlikely(has_tran_tmcbs(t, TMCB_RESPONSE_SENT))){