Hi All.
Is this allowed in ser.cfg and if so, what causes route(1) to evaluate true or false?
route {
if (route(1)) {
.. do something
} else {
.. do something else
}; }
route[1] {
if (some_condition) {
setflag(xx);
} else {
break;
}; }
__________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail
Hi Paul,
yes, this syntax is valid. A route() call returns as all the other SER cfg function true or false. The return value of a route is equal to a return value of the last function call from the route. NOTE: break returns all the time true :-)
Best regards, Marian
Java Rockx wrote:
Thanks for the info.
I have one more question.
If "break" always returns true, is there a way to always return false?
Regards, Paul
--- Marian Dumitru marian.dumitru@voice-sistem.ro wrote:
__________________________________ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250
Paul,
There is no function to have a fixed false return value. You can try some ticks (ugly, but may work) like calling function in such a way to return false for sure. Suggestion: reserve a flag which is permanently kept unset, and if you want to return false from a route, just call at the end isflagset()....as I said...is ugly...
Best regards, Marian
Java Rockx wrote: