Hello,
On 5/9/12 10:19 PM, Konstantin M. wrote:
Hello,
When I have the following code:
xlog("Dropped INVITE from unregistered location: $si:$sp.\n");
-- I'm getting a parse error:
0(3735) ERROR: <core> [pvapi.c:708]: error searching pvar "sp."
0(3735) ERROR: <core> [pvapi.c:912]: wrong char [./46] in [$sp.
] at [3 (0)]
0(3735) ERROR: xlog [xlog.c:314]: wrong format[Dropped INVITE from
unregistered location: $si:$sp.
]
When I changed to (removed a point after $sp):
xlog("Dropped INVITE from unregistered location: $si:$sp\n");
-- No errors.
What I'm doing wrong ? Or it's a parser bug ?
the dot '.' is an
allowed character in the name of variables. If the .
is not intended to be part of the name, just enclose the name in between
parenthesis, like '$(sp).' and all should be fine.
Cheers,
Daniel
--
Daniel-Constantin Mierla -
http://www.asipto.com
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda