From fe71dd340ab396b93bde45df438041af5d85fd47 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Mon, 1 Feb 2010 15:10:19 -0800 Subject: Merge giab-viewer-trunk 2497, general merge of more secapi stuff as well as certificate handling stuff. Grid manager as well --- indra/viewer_components/login/lllogin.cpp | 37 +++++++++++++++++++------------ 1 file changed, 23 insertions(+), 14 deletions(-) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index f5bda71846..7723c3ca8f 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -122,29 +122,34 @@ private: LLSD mAuthResponse, mValidAuthResponse; }; -void LLLogin::Impl::connect(const std::string& uri, const LLSD& credentials) +void LLLogin::Impl::connect(const std::string& uri, const LLSD& login_params) { + LL_DEBUGS("LLLogin") << " connect with uri '" << uri << "', login_params " << login_params << LL_ENDL; + // Launch a coroutine with our login_() method. Run the coroutine until // its first wait; at that point, return here. std::string coroname = LLCoros::instance().launch("LLLogin::Impl::login_", - boost::bind(&Impl::login_, this, _1, uri, credentials)); + boost::bind(&Impl::login_, this, _1, uri, login_params)); } -void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credentials) +void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_params) { - LLSD printable_credentials = credentials; - if(printable_credentials.has("params") - && printable_credentials["params"].has("passwd")) + try { - printable_credentials["params"]["passwd"] = "*******"; - } + LLSD printable_params = login_params; + //if(printable_params.has("params") + // && printable_params["params"].has("passwd")) + //{ + // printable_params["params"]["passwd"] = "*******"; + //} LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) - << " with uri '" << uri << "', credentials " << printable_credentials << LL_ENDL; + << " with uri '" << uri << "', parameters " << printable_params << LL_ENDL; // Arriving in SRVRequest state LLEventStream replyPump("reply", true); // Should be an array of one or more uri strings. + LLSD rewrittenURIs; { LLEventTimeout filter(replyPump); @@ -155,9 +160,9 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential // *NOTE:Mani - Completely arbitrary default timeout value for SRV request. F32 seconds_to_timeout = 5.0f; - if(credentials.has("cfg_srv_timeout")) + if(login_params.has("cfg_srv_timeout")) { - seconds_to_timeout = credentials["cfg_srv_timeout"].asReal(); + seconds_to_timeout = login_params["cfg_srv_timeout"].asReal(); } // If the SRV request times out (e.g. EXT-3934), simulate response: an @@ -167,9 +172,9 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential filter.eventAfter(seconds_to_timeout, fakeResponse); std::string srv_pump_name = "LLAres"; - if(credentials.has("cfg_srv_pump")) + if(login_params.has("cfg_srv_pump")) { - srv_pump_name = credentials["cfg_srv_pump"].asString(); + srv_pump_name = login_params["cfg_srv_pump"].asString(); } // Make request @@ -190,7 +195,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential urend(rewrittenURIs.endArray()); urit != urend; ++urit) { - LLSD request(credentials); + LLSD request(login_params); request["reply"] = replyPump.getName(); request["uri"] = *urit; std::string status; @@ -289,6 +294,10 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential error_response["reason"] = mAuthResponse["status"]; error_response["message"] = mAuthResponse["error"]; sendProgressEvent("offline", "fail.login", error_response); + } + catch (...) { + llerrs << "login exception caught" << llendl; + } } void LLLogin::Impl::disconnect() -- cgit v1.2.3 From 9e89819d55a3b6ee7fc56f3efb36f273e4e05c83 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Wed, 8 Jul 2009 00:45:17 +0000 Subject: DEV-34822 - merge with 1.23 certificate notification code -r 118191 ignore-dead-branch --- indra/viewer_components/login/lllogin.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 7723c3ca8f..452930a3b3 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -292,7 +292,12 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para // to success, add a data/message and data/reason fields. LLSD error_response; error_response["reason"] = mAuthResponse["status"]; + error_response["errorcode"] = mAuthResponse["errorcode"]; error_response["message"] = mAuthResponse["error"]; + if(mAuthResponse.has("certificate")) + { + error_response["certificate"] = mAuthResponse["certificate"]; + } sendProgressEvent("offline", "fail.login", error_response); } catch (...) { -- cgit v1.2.3 From ff52ac089f9ed67410f80fe66d0b997f0f2dafcc Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Wed, 15 Jul 2009 21:50:42 +0000 Subject: DEV-34822 viewer 1.23 merge DEV-32649 Merge the diamondware/vivox voice code -r124876 -r125220 --- indra/viewer_components/login/lllogin.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 452930a3b3..8af7453bd6 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -131,6 +131,7 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& login_params) std::string coroname = LLCoros::instance().launch("LLLogin::Impl::login_", boost::bind(&Impl::login_, this, _1, uri, login_params)); + LL_DEBUGS("LLLogin") << " connected with uri '" << uri << "', login_params " << login_params << LL_ENDL; } void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_params) -- cgit v1.2.3