summaryrefslogtreecommitdiff
path: root/indra/viewer_components/login/lllogin.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-07-07 19:41:27 +0100
committerRider Linden <rider@lindenlab.com>2015-07-07 19:41:27 +0100
commit247eb0c9c3418c10be8f2a0e3c8116758efa702f (patch)
treed3a448c69f1ad241dc72662970d702c2aa618382 /indra/viewer_components/login/lllogin.cpp
parentd785ec312bb7f4e77517eb44f46f276ba0129677 (diff)
Backout selfles merge 738255dbbfd679d9e615baab3398e5e345bbb3c5
Diffstat (limited to 'indra/viewer_components/login/lllogin.cpp')
-rwxr-xr-xindra/viewer_components/login/lllogin.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index 0569e9f3e8..b8408a6fb4 100755
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -107,8 +107,9 @@ private:
}
// In a coroutine's top-level function args, do NOT NOT NOT accept
- // references (const or otherwise) to anything! Pass by value only!
- void login_(std::string uri, LLSD credentials);
+ // references (const or otherwise) to anything but the self argument! Pass
+ // by value only!
+ void login_(LLCoros::self& self, std::string uri, LLSD credentials);
LLEventStream mPump;
LLSD mAuthResponse, mValidAuthResponse;
@@ -122,11 +123,11 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& login_params)
// its first wait; at that point, return here.
std::string coroname =
LLCoros::instance().launch("LLLogin::Impl::login_",
- boost::bind(&Impl::login_, this, uri, login_params));
+ 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_(std::string uri, LLSD login_params)
+void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_params)
{
try
{
@@ -136,7 +137,7 @@ void LLLogin::Impl::login_(std::string uri, LLSD login_params)
//{
// printable_params["params"]["passwd"] = "*******";
//}
- LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName()
+ LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self)
<< " with uri '" << uri << "', parameters " << printable_params << LL_ENDL;
// Arriving in SRVRequest state
@@ -175,7 +176,7 @@ void LLLogin::Impl::login_(std::string uri, LLSD login_params)
request["op"] = "rewriteURI";
request["uri"] = uri;
request["reply"] = replyPump.getName();
- rewrittenURIs = postAndWait(request, srv_pump_name, filter);
+ 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
@@ -221,10 +222,10 @@ void LLLogin::Impl::login_(std::string uri, LLSD login_params)
// returns. Subsequent responses, of course, must be awaited
// without posting again.
for (mAuthResponse = validateResponse(loginReplyPump.getName(),
- postAndWait(request, xmlrpcPump, loginReplyPump, "reply"));
+ postAndWait(self, request, xmlrpcPump, loginReplyPump, "reply"));
mAuthResponse["status"].asString() == "Downloading";
mAuthResponse = validateResponse(loginReplyPump.getName(),
- waitForEventOn(loginReplyPump)))
+ waitForEventOn(self, loginReplyPump)))
{
// Still Downloading -- send progress update.
sendProgressEvent("offline", "downloading");