summaryrefslogtreecommitdiff
path: root/indra/viewer_components/login
diff options
context:
space:
mode:
Diffstat (limited to 'indra/viewer_components/login')
-rwxr-xr-x[-rw-r--r--]indra/viewer_components/login/CMakeLists.txt11
-rwxr-xr-x[-rw-r--r--]indra/viewer_components/login/lllogin.cpp37
-rwxr-xr-x[-rw-r--r--]indra/viewer_components/login/lllogin.h0
-rwxr-xr-x[-rw-r--r--]indra/viewer_components/login/tests/lllogin_test.cpp0
4 files changed, 29 insertions, 19 deletions
diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt
index 7720619df3..6f366677c9 100644..100755
--- a/indra/viewer_components/login/CMakeLists.txt
+++ b/indra/viewer_components/login/CMakeLists.txt
@@ -9,12 +9,17 @@ endif(LL_TESTS)
include(LLCommon)
include(LLMath)
include(LLXML)
+include(Boost)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
${LLXML_INCLUDE_DIRS}
)
+include_directories(SYSTEM
+ ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
+ ${LLXML_SYSTEM_INCLUDE_DIRS}
+ )
set(login_SOURCE_FILES
lllogin.cpp
@@ -40,12 +45,18 @@ target_link_libraries(lllogin
${LLCOMMON_LIBRARIES}
${LLMATH_LIBRARIES}
${LLXML_LIBRARIES}
+ ${BOOST_CONTEXT_LIBRARY}
)
if(LL_TESTS)
SET(lllogin_TEST_SOURCE_FILES
lllogin.cpp
)
+ set_source_files_properties(
+ lllogin.cpp
+ PROPERTIES
+ LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_CONTEXT_LIBRARY}"
+ )
LL_ADD_PROJECT_UNIT_TESTS(lllogin "${lllogin_TEST_SOURCE_FILES}")
endif(LL_TESTS)
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index bdcb068200..8f33b2ad58 100644..100755
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -23,7 +23,6 @@
* $/LicenseInfo$
*/
-#include <boost/coroutine/coroutine.hpp>
#include "linden_common.h"
#include "llsd.h"
#include "llsdutil.h"
@@ -138,7 +137,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para
//{
// printable_params["params"]["passwd"] = "*******";
//}
- LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self)
+ LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self)
<< " with uri '" << uri << "', parameters " << printable_params << LL_ENDL;
// Arriving in SRVRequest state
@@ -147,23 +146,23 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para
LLSD rewrittenURIs;
{
- LLEventTimeout filter(replyPump);
- sendProgressEvent("offline", "srvrequest");
+ LLEventTimeout filter(replyPump);
+ sendProgressEvent("offline", "srvrequest");
- // Request SRV record.
- LL_DEBUGS("LLLogin") << "Requesting SRV record from " << uri << LL_ENDL;
+ // Request SRV record.
+ LL_DEBUGS("LLLogin") << "Requesting SRV record from " << uri << LL_ENDL;
- // *NOTE:Mani - Completely arbitrary default timeout value for SRV request.
+ // *NOTE:Mani - Completely arbitrary default timeout value for SRV request.
F32 seconds_to_timeout = 5.0f;
if(login_params.has("cfg_srv_timeout"))
{
seconds_to_timeout = login_params["cfg_srv_timeout"].asReal();
}
- // If the SRV request times out (e.g. EXT-3934), simulate response: an
- // array containing our original URI.
- LLSD fakeResponse(LLSD::emptyArray());
- fakeResponse.append(uri);
+ // If the SRV request times out (e.g. EXT-3934), simulate response: an
+ // array containing our original URI.
+ LLSD fakeResponse(LLSD::emptyArray());
+ fakeResponse.append(uri);
filter.eventAfter(seconds_to_timeout, fakeResponse);
std::string srv_pump_name = "LLAres";
@@ -173,13 +172,13 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para
}
// Make request
- LLSD request;
- request["op"] = "rewriteURI";
- request["uri"] = uri;
- request["reply"] = replyPump.getName();
- rewrittenURIs = postAndWait(self, request, srv_pump_name, filter);
- // EXP-772: If rewrittenURIs fail, try original URI as a fallback.
- rewrittenURIs.append(uri);
+ LLSD request;
+ request["op"] = "rewriteURI";
+ request["uri"] = uri;
+ request["reply"] = replyPump.getName();
+ rewrittenURIs = postAndWait(self, request, srv_pump_name, filter);
+ // EXP-772: If rewrittenURIs fail, try original URI as a fallback.
+ rewrittenURIs.append(uri);
} // we no longer need the filter
LLEventPump& xmlrpcPump(LLEventPumps::instance().obtain("LLXMLRPCTransaction"));
@@ -231,7 +230,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para
// Still Downloading -- send progress update.
sendProgressEvent("offline", "downloading");
}
-
+
LL_DEBUGS("LLLogin") << "Auth Response: " << mAuthResponse << LL_ENDL;
status = mAuthResponse["status"].asString();
diff --git a/indra/viewer_components/login/lllogin.h b/indra/viewer_components/login/lllogin.h
index 051641ff59..051641ff59 100644..100755
--- a/indra/viewer_components/login/lllogin.h
+++ b/indra/viewer_components/login/lllogin.h
diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp
index 58bf371a04..58bf371a04 100644..100755
--- a/indra/viewer_components/login/tests/lllogin_test.cpp
+++ b/indra/viewer_components/login/tests/lllogin_test.cpp