浏览代码

Proper parsing for PVs
Closes FS#202
- sr.pv.get fails for retrieving index header variable in Lua
(cherry picked from commit 8b9a98e8a8205b2214bf3503afea8aece20e2396)

Ovidiu Sas 13 年之前
父节点
当前提交
5fc59c44a6
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      pvapi.c

+ 3 - 1
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;
 }