diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-02-24 17:04:48 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-02-24 17:04:48 -0800 |
commit | 6bb43e1369d957a041c796120e87a89ff3fa10ee (patch) | |
tree | 678e25f3b62ab90e2940dfcae5feafa1acaa8ffc /indra/viewer_components/login | |
parent | ff52ac089f9ed67410f80fe66d0b997f0f2dafcc (diff) | |
parent | fc633fce71c6bdd43ab009558c7556f528335fe0 (diff) |
Automated merge up from viewer 2.0 trunk.
Some llvoiceclient changes duplicated changes that had already been
made in the voice modularization refactor, so the refactor versions
were used.
Diffstat (limited to 'indra/viewer_components/login')
-rw-r--r-- | indra/viewer_components/login/lllogin.cpp | 16 | ||||
-rw-r--r-- | indra/viewer_components/login/tests/lllogin_test.cpp | 12 |
2 files changed, 19 insertions, 9 deletions
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 8af7453bd6..e1922367bf 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -148,7 +148,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para << " with uri '" << uri << "', parameters " << printable_params << LL_ENDL; // Arriving in SRVRequest state - LLEventStream replyPump("reply", true); + LLEventStream replyPump("SRVreply", true); // Should be an array of one or more uri strings. LLSD rewrittenURIs; @@ -187,6 +187,10 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para } // we no longer need the filter LLEventPump& xmlrpcPump(LLEventPumps::instance().obtain("LLXMLRPCTransaction")); + // EXT-4193: use a DIFFERENT reply pump than for the SRV request. We used + // to share them -- but the EXT-3934 fix made it possible for an abandoned + // SRV response to arrive just as we were expecting the XMLRPC response. + LLEventStream loginReplyPump("loginreply", true); // Loop through the rewrittenURIs, counting attempts along the way. // Because of possible redirect responses, we may make more than one @@ -197,7 +201,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para urit != urend; ++urit) { LLSD request(login_params); - request["reply"] = replyPump.getName(); + request["reply"] = loginReplyPump.getName(); request["uri"] = *urit; std::string status; @@ -222,11 +226,11 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para // possible for the reply to arrive before the post() call // returns. Subsequent responses, of course, must be awaited // without posting again. - for (mAuthResponse = validateResponse(replyPump.getName(), - postAndWait(self, request, xmlrpcPump, replyPump, "reply")); + for (mAuthResponse = validateResponse(loginReplyPump.getName(), + postAndWait(self, request, xmlrpcPump, loginReplyPump, "reply")); mAuthResponse["status"].asString() == "Downloading"; - mAuthResponse = validateResponse(replyPump.getName(), - waitForEventOn(self, replyPump))) + mAuthResponse = validateResponse(loginReplyPump.getName(), + waitForEventOn(self, loginReplyPump))) { // Still Downloading -- send progress update. sendProgressEvent("offline", "downloading"); diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp index 8463e6d2ca..51f5cd0692 100644 --- a/indra/viewer_components/login/tests/lllogin_test.cpp +++ b/indra/viewer_components/login/tests/lllogin_test.cpp @@ -441,8 +441,8 @@ namespace tut // Testing normal login procedure. LLEventStream llaresPump("LLAres"); // Dummy LLAres pump. - // LLAresListener dummyLLAres("dummy_llares"); - // dummyLLAres.listenTo(llaresPump); + LLAresListener dummyLLAres("dummy_llares"); + dummyLLAres.listenTo(llaresPump); LLLogin login; LoginListener listener("test_ear"); @@ -470,6 +470,12 @@ namespace tut // the original URI. ensure_equals("Auth state", listener.lastEvent()["change"].asString(), "authenticating"); ensure_equals("Attempt", listener.lastEvent()["data"]["attempt"].asInteger(), 1); - ensure_equals("URI", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.bar.com"); + ensure_equals("URI", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.bar.com"); + + // EXT-4193: if the SRV reply isn't lost but merely late, and if it + // arrives just at the moment we're expecting the XMLRPC reply, the + // original code got confused and crashed. Drive that case here. We + // observe that without the fix, this call DOES repro. + dummyLLAres.sendReply(); } } |