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
(cherry picked from commit
b8ecabd1ba8161a0b30067d478a993866778058e)