Fix #3090663: Re-authentication fails (3rd attempt)
commitb8ecabd1ba8161a0b30067d478a993866778058e
authorStefan Becker <stefan.becker@nokia.com>
Thu, 21 Oct 2010 17:33:16 +0000 (21 20:33 +0300)
committerStefan Becker <stefan.becker@nokia.com>
Thu, 21 Oct 2010 17:50:00 +0000 (21 20:50 +0300)
tree2a1432dd5c4bb06b284d3676ec176dc9e740041f
parentb1f3839761ff601c7f11fc45fe2d6df98925a667
Fix #3090663: Re-authentication fails (3rd attempt)

Commit 2580b6f0e838df159e9aa1ca1c9e4c62dab69c6c fixed the original problem.
But the log provided by the user showed that there are more problems: the code
only handled "401 Unauthorized" error responses to re-REGISTER messages.

The log showed a case where we got a "504 Server time-out" response which we
simply ignored. As the code never sent another REGISTER message the server
dropped the connection after the next re-register timeout and the user got
a "SSL read error" message.

Now the code processes all responses to REGISTER. If we are re-registering then
process_register_response() will handle

 - 401 by triggering a full re-authentication (this fixes the original problem)
 - 504 by scheduling another re-register attempt after 60 seconds
src/core/sip-transport.c