summaryrefslogtreecommitdiff
path: root/indra/viewer_components
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2015-07-01 18:33:29 -0400
committerNat Goodspeed <nat@lindenlab.com>2015-07-01 18:33:29 -0400
commitb262ded7e0cf21314524bf702b0e4fe28a3c3060 (patch)
tree29956f8ff76bce557936c408c683838b015cc50e /indra/viewer_components
parent41dff76327feffed798c8b24673885bc9ad61005 (diff)
MAINT-5351: Remove 'self' parameter from coroutine functions.
lleventcoro_test.cpp runs clean (as modified for new API), and all the rest builds clean, but the resulting viewer is as yet untested.
Diffstat (limited to 'indra/viewer_components')
-rwxr-xr-xindra/viewer_components/login/lllogin.cpp17
-rwxr-xr-xindra/viewer_components/updater/llupdatechecker.cpp6
-rwxr-xr-xindra/viewer_components/updater/llupdatechecker.h2
3 files changed, 12 insertions, 13 deletions
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index b8408a6fb4..0569e9f3e8 100755
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -107,9 +107,8 @@ private:
}
// In a coroutine's top-level function args, do NOT NOT NOT accept
- // references (const or otherwise) to anything but the self argument! Pass
- // by value only!
- void login_(LLCoros::self& self, std::string uri, LLSD credentials);
+ // references (const or otherwise) to anything! Pass by value only!
+ void login_(std::string uri, LLSD credentials);
LLEventStream mPump;
LLSD mAuthResponse, mValidAuthResponse;
@@ -123,11 +122,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, _1, uri, login_params));
+ boost::bind(&Impl::login_, this, 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)
+void LLLogin::Impl::login_(std::string uri, LLSD login_params)
{
try
{
@@ -137,7 +136,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()
<< " with uri '" << uri << "', parameters " << printable_params << LL_ENDL;
// Arriving in SRVRequest state
@@ -176,7 +175,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para
request["op"] = "rewriteURI";
request["uri"] = uri;
request["reply"] = replyPump.getName();
- rewrittenURIs = postAndWait(self, request, srv_pump_name, filter);
+ rewrittenURIs = postAndWait(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
@@ -222,10 +221,10 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para
// returns. Subsequent responses, of course, must be awaited
// without posting again.
for (mAuthResponse = validateResponse(loginReplyPump.getName(),
- postAndWait(self, request, xmlrpcPump, loginReplyPump, "reply"));
+ postAndWait(request, xmlrpcPump, loginReplyPump, "reply"));
mAuthResponse["status"].asString() == "Downloading";
mAuthResponse = validateResponse(loginReplyPump.getName(),
- waitForEventOn(self, loginReplyPump)))
+ waitForEventOn(loginReplyPump)))
{
// Still Downloading -- send progress update.
sendProgressEvent("offline", "downloading");
diff --git a/indra/viewer_components/updater/llupdatechecker.cpp b/indra/viewer_components/updater/llupdatechecker.cpp
index 29cb238892..e889f83aa9 100755
--- a/indra/viewer_components/updater/llupdatechecker.cpp
+++ b/indra/viewer_components/updater/llupdatechecker.cpp
@@ -117,7 +117,7 @@ void LLUpdateChecker::Implementation::checkVersion(std::string const & urlBase,
LL_INFOS("UpdaterService") << "checking for updates at " << checkUrl << LL_ENDL;
LLCoros::instance().launch("LLUpdateChecker::Implementation::checkVersionCoro",
- boost::bind(&Implementation::checkVersionCoro, this, _1, checkUrl));
+ boost::bind(&Implementation::checkVersionCoro, this, checkUrl));
}
else
@@ -126,7 +126,7 @@ void LLUpdateChecker::Implementation::checkVersion(std::string const & urlBase,
}
}
-void LLUpdateChecker::Implementation::checkVersionCoro(LLCoros::self& self, std::string url)
+void LLUpdateChecker::Implementation::checkVersionCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
@@ -135,7 +135,7 @@ void LLUpdateChecker::Implementation::checkVersionCoro(LLCoros::self& self, std:
LL_INFOS("checkVersionCoro") << "Getting update information from " << url << LL_ENDL;
- LLSD result = httpAdapter->getAndYield(self, httpRequest, url);
+ LLSD result = httpAdapter->getAndYield(httpRequest, url);
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
diff --git a/indra/viewer_components/updater/llupdatechecker.h b/indra/viewer_components/updater/llupdatechecker.h
index e5050bb952..d10ea4cf42 100755
--- a/indra/viewer_components/updater/llupdatechecker.h
+++ b/indra/viewer_components/updater/llupdatechecker.h
@@ -106,7 +106,7 @@ private:
unsigned char uniqueid[MD5HEX_STR_SIZE],
bool willing_to_test);
- void checkVersionCoro(LLCoros::self& self, std::string url);
+ void checkVersionCoro(std::string url);
LOG_CLASS(LLUpdateChecker::Implementation);
};