Hi,
Let route[FOO]{...} returns -1, 0, or 1 value.
Next example never print message in case -1:
switch (route(FOO)) {
case -1:
xlog("L_INFO", "FOO = -1\n");
break;
case 0:
xlog("L_INFO", "FOO = zero\n");
break;
case 1:
xlog("L_INFO", "FOO = +1\n");
break;
}
Result from route(FOO) less then to zero converted to 0, so never get label -1,
but next example works properly (when use $rc):
route(FOO);
switch ($rc) {
case -1:
xlog("L_INFO", "FOO = -1\n");
break;
case 0:
xlog("L_INFO", "FOO = zero\n");
break;
case 1:
xlog("L_INFO", "FOO = +1\n");
break;
}
Is this bug, or regular behavior ?
Regards,
Seudin