浏览代码

- 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 24 年之前
父节点
当前提交
9e973a637f
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      action.c

+ 7 - 0
action.c

@@ -337,11 +337,18 @@ int do_action(struct action* a, struct sip_msg* msg)
 						LOG(L_WARN,"WARNING: do_action:"
 									"error in expression\n");
 					}
+#if 0
+					/*andrei: totally wrong, it will bail out at the first 
+					 * false expression and if w/o else!!!!!!*/
+
 					/* jku ret=1;  default is continue */
 					ret=( v!=0); /* stop if things went wrong,
 								  continue if FALSE (<0) or
 								  TRUE (>0) returned */
 					/* jku: if (v==1){ */
+#endif
+
+					ret=1;  /*default is continue */
 					if (v>0) {
 						if ((a->p2_type==ACTIONS_ST)&&a->p2.data){
 							ret=run_actions((struct action*)a->p2.data, msg);