|
@@ -189,6 +189,7 @@ int pv_xbuff_parse_name(pv_spec_t *sp, str *in)
|
|
str idx;
|
|
str idx;
|
|
str name;
|
|
str name;
|
|
str attr;
|
|
str attr;
|
|
|
|
+ int l;
|
|
|
|
|
|
if (in->s == NULL || in->len <= 0)
|
|
if (in->s == NULL || in->len <= 0)
|
|
return -1;
|
|
return -1;
|
|
@@ -201,7 +202,8 @@ int pv_xbuff_parse_name(pv_spec_t *sp, str *in)
|
|
if (*p == '[' || *p== '=')
|
|
if (*p == '[' || *p== '=')
|
|
break;
|
|
break;
|
|
if (!is_pv_xbuff_valid_char(*p)) {
|
|
if (!is_pv_xbuff_valid_char(*p)) {
|
|
- LM_ERR("invalid character in var name %.*s at %d\n",STR_FMT(in),p-in->s);
|
|
|
|
|
|
+ l = p-in->s;
|
|
|
|
+ LM_ERR("invalid character in var name %.*s at %d\n",STR_FMT(in),l);
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
p++;
|
|
p++;
|
|
@@ -239,7 +241,8 @@ int pv_xbuff_parse_name(pv_spec_t *sp, str *in)
|
|
p++;
|
|
p++;
|
|
|
|
|
|
if (!is_in_str(p,in) || *p!='>') {
|
|
if (!is_in_str(p,in) || *p!='>') {
|
|
- LM_ERR("invalid operator (expected =>) for accessing attribute in token %.*s at position %d\n",STR_FMT(in),p-in->s);
|
|
|
|
|
|
+ l = p-in->s;
|
|
|
|
+ LM_ERR("invalid operator (expected =>) for accessing attribute in token %.*s at position %d\n",STR_FMT(in),l);
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -247,7 +250,8 @@ int pv_xbuff_parse_name(pv_spec_t *sp, str *in)
|
|
|
|
|
|
while (is_in_str(p,in)) {
|
|
while (is_in_str(p,in)) {
|
|
if (!is_pv_xbuff_valid_char(*p)) {
|
|
if (!is_pv_xbuff_valid_char(*p)) {
|
|
- LM_ERR("invalid character in attribute name in token %.*s at %d\n",STR_FMT(in),p-in->s);
|
|
|
|
|
|
+ l = p-in->s;
|
|
|
|
+ LM_ERR("invalid character in attribute name in token %.*s at %d\n",STR_FMT(in),l);
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
p++;
|
|
p++;
|
|
@@ -276,7 +280,8 @@ int pv_xbuff_parse_name(pv_spec_t *sp, str *in)
|
|
}
|
|
}
|
|
|
|
|
|
if (p < in->s + in->len) {
|
|
if (p < in->s + in->len) {
|
|
- LM_ERR("unexpected token in %.*s at %d\n",STR_FMT(in),p-in->s);
|
|
|
|
|
|
+ l = p-in->s;
|
|
|
|
+ LM_ERR("unexpected token in %.*s at %d\n",STR_FMT(in),l);
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
|
|
|