i have defined two routes:
route [TEST_ROUTE_MINUS_ONE] {
return (-1);
}
route [TEST_ROUTE_PLUS_ONE] {
return (1);
}
and then test them with these statements:
if (route(TEST_ROUTE_MINUS_ONE) == -1) {
xlog("L_INFO", "TEST_ROUTE returned -1\n");
}
if (!route(TEST_ROUTE_MINUS_ONE)) {
xlog("L_INFO", "TEST_ROUTE returned failure\n");
}
if (route(TEST_ROUTE_PLUS_ONE) == 1) {
xlog("L_INFO", "TEST_ROUTE returned 1\n");
}
if (route(TEST_ROUTE_PLUS_ONE)) {
xlog("L_INFO", "TEST_ROUTE returned success\n");
}
can someone explain, why i get only three lines to syslog?
Dec 10 16:14:56 sip /usr/sbin/sip-proxy[16099]: INFO: TEST_ROUTE_MINUS_ONE returned
failure
Dec 10 16:14:56 sip /usr/sbin/sip-proxy[16099]: INFO: TEST_ROUTE_PLUS_ONE returned 1
Dec 10 16:14:56 sip /usr/sbin/sip-proxy[16099]: INFO: TEST_ROUTE_PLUS_ONE returned
success
-- juha