Module: sip-router Branch: master Commit: 8b9a98e8a8205b2214bf3503afea8aece20e2396 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8b9a98e8...
Author: Ovidiu Sas osas@voipembedded.com Committer: Ovidiu Sas osas@voipembedded.com Date: Tue Feb 7 19:12:36 2012 -0500
Proper parsing for PVs Closes FS#202 - sr.pv.get fails for retrieving index header variable in Lua
---
pvapi.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/pvapi.c b/pvapi.c index 940f017..d1ebfe6 100644 --- a/pvapi.c +++ b/pvapi.c @@ -125,7 +125,7 @@ int pv_locate_name(str *in) { /* name with parenthesis: $(...) */ pcount = 1; - for(i=1; i<in->len; i++) + for(i=2; i<in->len; i++) { if(in->s[i]==PV_LNBRACKET) pcount++; @@ -135,6 +135,7 @@ int pv_locate_name(str *in) return i+1; } /* non-closing name parenthesis */ + LM_ERR("non-closing name parenthesis [%.*s]\n",in->len,in->s); return -1; }
@@ -167,6 +168,7 @@ int pv_locate_name(str *in) return i+1; } /* non-closing inner-name parenthesis */ + LM_ERR("non-closing inner-name parenthesis [%.*s]\n",in->len,in->s); return -1; }