[sr-dev] git:tmp/k3.0_sr_backports: core: exit() is now equivalent to exit 1

Andrei Pelinescu-Onciul andrei at iptel.org
Mon Feb 1 12:32:30 CET 2010


Module: sip-router
Branch: tmp/k3.0_sr_backports
Commit: 9954a52e8fa08a4f729e1b211c16e47aea095883
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9954a52e8fa08a4f729e1b211c16e47aea095883

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Mon Feb  1 12:16:50 2010 +0100

core: exit() is now equivalent to exit 1

exit or exit() no longer drop messages by default. They now end
the script with return==1 (instead of 0).
Note that exit 0 is equivalent with DROP in non-kamailio mode and
in most routes, but this kind of usage is deprecated (use drop
instead of exit 0).

---

 cfg.y |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/cfg.y b/cfg.y
index 9a71817..4318728 100644
--- a/cfg.y
+++ b/cfg.y
@@ -3239,7 +3239,8 @@ ret_cmd:
 						(void*)(DROP_R_F|EXIT_R_F)); set_cfg_pos($$);
 	}
 	| EXIT LPAREN RPAREN		{
-		$$=mk_action(DROP_T, 2, NUMBER_ST, 0, NUMBER_ST, (void*)EXIT_R_F);
+		$$=mk_action(DROP_T, 2, NUMBER_ST, (void*)1, NUMBER_ST,
+						(void*)EXIT_R_F);
 		set_cfg_pos($$);
 	}
 	| EXIT rval_expr	{
@@ -3247,7 +3248,8 @@ ret_cmd:
 		set_cfg_pos($$);
 	}
 	| EXIT				{
-		$$=mk_action(DROP_T, 2, NUMBER_ST, 0, NUMBER_ST, (void*)EXIT_R_F);
+		$$=mk_action(DROP_T, 2, NUMBER_ST, (void*)1, NUMBER_ST,
+						(void*)EXIT_R_F);
 		set_cfg_pos($$);
 	}
 	| RETURN			{




More information about the sr-dev mailing list