git:kamailio_3.0: throw error if parameters to module functions are int

1 message Options
Embed this post
Permalink
Daniel-Constantin Mierla

git:kamailio_3.0: throw error if parameters to module functions are int

Reply Threaded More More options
Print post
Permalink
Module: sip-router
Branch: kamailio_3.0
Commit: eb687b701730b48dffbd49a99103c64c0c3294da
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=eb687b701730b48dffbd49a99103c64c0c3294da

Author: Daniel-Constantin Mierla <[hidden email]>
Committer: Daniel-Constantin Mierla <[hidden email]>
Date:   Fri Oct 30 13:22:27 2009 +0100

throw error if parameters to module functions are int

---

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

diff --git a/cfg.y b/cfg.y
index 585edf5..9b4c0d1 100644
--- a/cfg.y
+++ b/cfg.y
@@ -3087,7 +3087,8 @@ func_params:
  | func_params error { yyerror("call params error\n"); }
  ;
 func_param:
-        intno {
+    intno {
+#if 0
  if (mod_func_action->val[1].u.number < MAX_ACTIONS-2) {
  mod_func_action->val[mod_func_action->val[1].u.number+2].type =
  NUMBER_ST;
@@ -3097,6 +3098,9 @@ func_param:
  } else {
  yyerror("Too many arguments\n");
  }
+#else
+ yyerror("Function parameter with integer value not allowed\n");
+#endif
  }
  | STRING {
  if (mod_func_action->val[1].u.number < MAX_ACTIONS-2) {


_______________________________________________
sr-dev mailing list
[hidden email]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev