Andrei Pelinescu-Onciul writes:
Could you try something like:
$x=$sel(...));
$y=@...;
$z=(int)$sel(...);
and print the values with xlog?
If $x!=$y, please put it on the bug tracker (and assign Daniel to it
:-)).
i can write
if ($sel(cfg_get.local.phone_timeout) != @cfg_get.local.phone_timeout) {
xlog("not equal\n");
};
and nothing gets printed to syslog, i.e., it seems to work.
but if i replace != with <, sr does not even start, but prints
0(7102) : <core> [cfg.y:3379]: parse error in config file
/etc/sip-proxy/sip-proxy.cfg, line 518, column 40-70: bad expression: type mismatch: str
instead of int at (518,70)
0(7102) : <core> [cfg.y:3382]: parse error in config file
/etc/sip-proxy/sip-proxy.cfg, line 520, column 6: bad command
same, if i try
if ((int)$sel(cfg_get.local.phone_timeout) > @cfg_get.local.phone_timeout) {
xlog("not equal\n");
};
but if in move (int) to @ select
if ($sel(cfg_get.local.phone_timeout) > (int)(a)cfg_get.local.phone_timeout) {
xlog("not equal\n");
};
then the start error goes away.
so to me it looks like there is a bug in parsing of
@cfg_get.local.phone_timeout. there is no way the parser could know the
type of @ select. it can only be determined at run time.
is this a "feature" or a bug that i should add to the tracker.
-- juha