look at this:
$var(test) = "foo";
if ($var(test)) {
xlog("L_INFO", "EXTR: $var(test) has value\n");
} else {
xlog("L_INFO", "EXTR: $var(test) does NOT have value\n");
}
$var(test) = 1;
if ($var(test)) {
xlog("L_INFO", "EXTR: $var(test) has value\n");
} else {
xlog("L_INFO", "EXTR: $var(test) does NOT have value\n");
}
prints
Sep 2 14:17:23 localhost /usr/sbin/sip-router[14295]: INFO: EXTR: foo does NOT have
value
Sep 2 14:17:23 localhost /usr/sbin/sip-router[14295]: INFO: EXTR: 1 has value
this is not good and makes programming VERY error prone.
-- juha