Browse code

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).

Andrei Pelinescu-Onciul authored on 01/02/2010 11:16:50
Showing 1 changed files
... ...
@@ -3239,7 +3239,8 @@ ret_cmd:
3239 3239
 						(void*)(DROP_R_F|EXIT_R_F)); set_cfg_pos($$);
3240 3240
 	}
3241 3241
 	| EXIT LPAREN RPAREN		{
3242
-		$$=mk_action(DROP_T, 2, NUMBER_ST, 0, NUMBER_ST, (void*)EXIT_R_F);
3242
+		$$=mk_action(DROP_T, 2, NUMBER_ST, (void*)1, NUMBER_ST,
3243
+						(void*)EXIT_R_F);
3243 3244
 		set_cfg_pos($$);
3244 3245
 	}
3245 3246
 	| EXIT rval_expr	{
... ...
@@ -3247,7 +3248,8 @@ ret_cmd:
3247 3247
 		set_cfg_pos($$);
3248 3248
 	}
3249 3249
 	| EXIT				{
3250
-		$$=mk_action(DROP_T, 2, NUMBER_ST, 0, NUMBER_ST, (void*)EXIT_R_F);
3250
+		$$=mk_action(DROP_T, 2, NUMBER_ST, (void*)1, NUMBER_ST,
3251
+						(void*)EXIT_R_F);
3251 3252
 		set_cfg_pos($$);
3252 3253
 	}
3253 3254
 	| RETURN			{