From 46291bf740f3eacd7030a64b319cce94551c8447 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 4 Jun 2009 01:59:31 +0000 Subject: DEV-32777: Make coroutine's top-level function accept value params, not reference params. --- indra/viewer_components/login/lllogin.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 575a709761..c6ed98c6b6 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -105,9 +105,12 @@ private: return response; } - typedef boost::coroutines::coroutine coroutine_type; + typedef boost::coroutines::coroutine coroutine_type; - void login_(coroutine_type::self& self, const std::string& uri, const LLSD& credentials); + // 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_(coroutine_type::self& self, std::string uri, LLSD credentials); LLEventStream mPump; LLSD mAuthResponse, mValidAuthResponse; @@ -124,8 +127,7 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& credentials) uri, credentials); } -void LLLogin::Impl::login_(coroutine_type::self& self, - const std::string& uri, const LLSD& credentials) +void LLLogin::Impl::login_(coroutine_type::self& self, std::string uri, LLSD credentials) { LL_INFOS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) << LL_ENDL; // Arriving in SRVRequest state -- cgit v1.3