It can look stupidity, but, I dislike this 'else if' structure.... so,
suppressing the 'else' from the 'else if' wouldn't change in nothing
the
logic, so have you tested this suppression?
Edson.
Em 18/11/2011 09:32, Alex Balashov escreveu:
On 11/18/2011 06:24 AM, Fred Posner wrote:
What happens if you move the Register to the
beginning of the if
statement?
While I have not empirically investigated this, the structure literally
looks like this:
if(is_method("OPTIONS")) {
# respond to OPTIONS pings
exit;
}
else if(is_method("INVITE")) {
# route the INVITE
exit;
}
else if(is_method("REGISTER")) {
xlog(...);
route(2);
}
else {
# 403 Forbidden
}
Also, if this were a logic problem, wouldn't it happen all the time?
This registrar has many thousands of users, out of which about half a
dozen have reported this problem, and for them, it only occurs for at
most a few minutes out of each day.