[SR-Dev] git:andrei/script_vars: script: pvar name parsing fix

Andrei Pelinescu-Onciul andrei at iptel.org
Thu Dec 4 01:11:31 CET 2008


Module: sip-router
Branch: andrei/script_vars
Commit: 2ac5604bdab43ca5ddf10a1db0ea3f61f2d7d912
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2ac5604bdab43ca5ddf10a1db0ea3f61f2d7d912

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Thu Dec  4 01:05:32 2008 +0100

script: pvar name parsing fix

- fix parsing pvar names of the form $pvar(...)

---

 cfg.lex |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cfg.lex b/cfg.lex
index c4f5a14..4ce14d0 100644
--- a/cfg.lex
+++ b/cfg.lex
@@ -830,7 +830,8 @@ EAT_ABLE	[\ \t\b\r]
 <AVP_PVAR>{AVP_PREF}		|
 <AVP_PVAR>{ID}{LBRACK}		{ state = ATTR_S; BEGIN(ATTR); yyless(1); 
 							  return ATTR_MARK; }
-<AVP_PVAR>{ID}{LPAREN}		{ state = PVAR_P_S; BEGIN(PVAR_P); yymore(); }
+<AVP_PVAR>{ID}{LPAREN}		{ state = PVAR_P_S; p_nest=1; BEGIN(PVAR_P);
+								yymore(); }
 <AVP_PVAR>{ID}				{	count(); addstr(&s_buf, yytext, yyleng);
 								yylval.strval=s_buf.s;
 								memset(&s_buf, 0, sizeof(s_buf));




More information about the sr-dev mailing list