Module: sip-router
Branch: sr_3.0
Commit: 33f8af89d77055c1eaf38d8c64eb21d85478f5f3
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=33f8af8…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Feb 1 12:36:49 2010 +0100
Merge remote branch 'origin/tmp/k3.0_sr_backports' into sr_3.0
* origin/tmp/k3.0_sr_backports:
tm: fix setting the pre-T callbacks
drouting: register MI commands
drouting(k): Makefile updated to link libs
registrar(k): preserve old bflags upon lookup
pv: fixed author name
tm: set request and reply for TMCB_RESPONSE_SENT
tm: run release function for tmcb parameters
tm: t_on_xyz("0") fixup updates
core: usage of drop in onsend_route for Kamailio compatibility
core: exit() is now equivalent to exit 1
core: drop reply ser compatibility
core: drop reply in K compatible style
sanity: fix include file due to previous re-location
sanity: moved module from modules_s to modules
---
Module: sip-router
Branch: tmp/k3.0_sr_backports
Commit: ae12edc44eee771fb67101dbbed14a1232950be3
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ae12edc…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Feb 1 12:06:08 2010 +0100
core: drop reply ser compatibility
- drop reply also if ret==0, not only on DROP
(e.g. modules function returning 0). This preserves
compatibility with old scripts.
- uncomment the onreply_route error handling. It was commented out
by the last commit
(0621319 core: drop reply in K compatible style). To disable it,
define NO_ONREPLY_ROUTE_ERROR.
---
receive.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/receive.c b/receive.c
index df8f11f..49c7c0b 100644
--- a/receive.c
+++ b/receive.c
@@ -230,14 +230,14 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
if (onreply_rt.rlist[DEFAULT_RT]){
set_route_type(ONREPLY_ROUTE);
ret=run_top_route(onreply_rt.rlist[DEFAULT_RT], msg, &ctx);
-#if 0
- if (ret<0){
+#ifndef NO_ONREPLY_ROUTE_ERROR
+ if (unlikely(ret<0)){
LOG(L_WARN, "WARNING: receive_msg: "
"error while trying onreply script\n");
goto error_rpl;
}else
-#endif
- if (ctx.run_flags&DROP_R_F){
+#endif /* NO_ONREPLY_ROUTE_ERROR */
+ if (unlikely(ret==0 || (ctx.run_flags&DROP_R_F))){
goto skip_send_reply; /* drop the message, no error */
}
}
@@ -269,13 +269,13 @@ end:
if (skipped) STATS_RX_DROPS;
#endif
return 0;
-#if 0
+#ifndef NO_ONREPLY_ROUTE_ERROR
error_rpl:
/* execute post reply-script callbacks */
exec_post_script_cb(msg, ONREPLY_CB_TYPE);
reset_avps();
goto error02;
-#endif
+#endif /* NO_ONREPLY_ROUTE_ERROR */
error_req:
DBG("receive_msg: error:...\n");
/* execute post request-script callbacks */