Browse code

- fixed big if expression bug (introduced by Jiri) (an if without else with an expression evaluating to false would cause ser to bail out of the script!!!) - reverted to all style drop in condition behaviour (stop condition evaluation)

Andrei Pelinescu-Onciul authored on 23/01/2002 17:17:33
Showing 1 changed files
... ...
@@ -337,11 +337,18 @@ int do_action(struct action* a, struct sip_msg* msg)
337 337
 						LOG(L_WARN,"WARNING: do_action:"
338 338
 									"error in expression\n");
339 339
 					}
340
+#if 0
341
+					/*andrei: totally wrong, it will bail out at the first 
342
+					 * false expression and if w/o else!!!!!!*/
343
+
340 344
 					/* jku ret=1;  default is continue */
341 345
 					ret=( v!=0); /* stop if things went wrong,
342 346
 								  continue if FALSE (<0) or
343 347
 								  TRUE (>0) returned */
344 348
 					/* jku: if (v==1){ */
349
+#endif
350
+
351
+					ret=1;  /*default is continue */
345 352
 					if (v>0) {
346 353
 						if ((a->p2_type==ACTIONS_ST)&&a->p2.data){
347 354
 							ret=run_actions((struct action*)a->p2.data, msg);