Login crash bug fix.

XMLRPCResponder constructor was missing.
This fixes the following crash signature:

VIEWER      : 2012-12-12T14:25:13Z INFO("AppInit"): setStartupState: Startup state changing from STATE_LOGIN_NO_DATA_YET to STATE_LOGIN_DOWNLOADING
VIEWER      : 2012-12-12T14:25:14Z INFO("AppInit"): transferRate: Buffer size:   1308 B
VIEWER      : 2012-12-12T14:25:14Z INFO("AppInit"): transferRate: Transfer rate: 11 kb/s

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff33df7f5 in XMLRPC_RequestGetData () from /usr/lib/x86_64-linux-gnu/libxmlrpc-epi.so.0
(gdb) bt

Reason was that if the server replied with some error code then
mResponse was undefined.

I also added code to retry three times in that case;
the http status code that I get was 503, which really
mean "Service *temporarily* unavailable", so a retry
is in order.
This commit is contained in:
Aleric Inglewood
2012-12-12 16:14:32 +01:00
parent 018737eb15
commit 5fe0820e13
4 changed files with 20 additions and 8 deletions

View File

@@ -1432,7 +1432,6 @@ bool idle_startup()
LL_DEBUGS("AppInit") << "downloading..." << LL_ENDL;
return FALSE;
}
Debug(if (gCurlIo) dc::curlio.off()); // Login succeeded: restore dc::curlio to original state.
LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE );
progress += 0.01f;
set_startup_status(progress, LLTrans::getString("LoginProcessingResponse"), auth_message);
@@ -1469,6 +1468,7 @@ bool idle_startup()
{
// Yay, login!
successful_login = true;
Debug(if (gCurlIo) dc::curlio.off()); // Login succeeded: restore dc::curlio to original state.
}
else
{
@@ -1548,13 +1548,12 @@ bool idle_startup()
}
}
break;
case LLUserAuth::E_COULDNT_RESOLVE_HOST:
case LLUserAuth::E_SSL_PEER_CERTIFICATE:
case LLUserAuth::E_UNHANDLED_ERROR:
case LLUserAuth::E_SSL_CACERT:
case LLUserAuth::E_SSL_CONNECT_ERROR:
default:
if (LLViewerLogin::getInstance()->tryNextURI())
{
static int http_failures = 0;
http_failures = (error == LLUserAuth::E_HTTP_SERVER_ERROR) ? http_failures + 1 : 0;
if ((error == LLUserAuth::E_HTTP_SERVER_ERROR && http_failures <= 3) ||
LLViewerLogin::getInstance()->tryNextURI())
{
static int login_attempt_number = 0;
std::ostringstream s;
@@ -1569,6 +1568,7 @@ bool idle_startup()
emsg << "Unable to connect to " << gHippoGridManager->getCurrentGrid()->getGridName() << ".\n";
emsg << LLUserAuth::getInstance()->errorMessage();
}
}
break;
}