Module: sip-router
Branch: tmp/k3.0_sr_backports
Commit: 5d34bdcd2ae8d9fe7356412d9f0f310ad23066e7
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5d34bdc…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu Dec 24 17:11:58 2009 +0100
core: usage of drop in onsend_route for Kamailio compatibility
- in K exit and drop have different behavior in some cases
- fr onsend_route exit means stop executing the actions and drop does in
addition discard sending the message
(cherry picked from commit 8a43c6fcb21ff7aeb097b1d8791bfc3d8f020bcb)
---
onsend.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/onsend.h b/onsend.h
index deec874..eb5569b 100644
--- a/onsend.h
+++ b/onsend.h
@@ -40,6 +40,7 @@
#include "action.h"
#include "route.h"
#include "script_cb.h"
+#include "sr_compat.h"
struct onsend_info{
union sockaddr_union* to;
@@ -89,6 +90,10 @@ static inline int run_onsend(struct sip_msg* orig_msg, struct
dest_info* dst,
orig_msg->fwd_send_flags=fwd_snd_flags_bak;
orig_msg->rpl_send_flags=rpl_snd_flags_bak;
exec_post_script_cb(orig_msg, ONSEND_CB_TYPE);
+ if((sr_cfg_compat==SR_COMPAT_KAMAILIO)
+ && (ret==0) && !(ra_ctx.run_flags&DROP_R_F)){
+ ret = 1;
+ }
} else {
ret=0; /* drop the message */
}