diff options
76 files changed, 1160 insertions, 1047 deletions
diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp index baaddcaed1..d76401d01b 100755 --- a/indra/llcommon/llcoros.cpp +++ b/indra/llcommon/llcoros.cpp @@ -39,6 +39,44 @@ #include "llerror.h" #include "stringize.h" +// do nothing, when we need nothing done +void LLCoros::no_cleanup(CoroData*) {} + +// CoroData for the currently-running coroutine. Use a thread_specific_ptr +// because each thread potentially has its own distinct pool of coroutines. +// This thread_specific_ptr does NOT own the CoroData object! That's owned by +// LLCoros::mCoros. It merely identifies it. For this reason we instantiate +// it with a no-op cleanup function. +boost::thread_specific_ptr<LLCoros::CoroData> +LLCoros::sCurrentCoro(LLCoros::no_cleanup); + +//static +LLCoros::coro::self& LLCoros::get_self() +{ + CoroData* current = sCurrentCoro.get(); + if (! current) + { + LL_ERRS("LLCoros") << "Calling get_self() from non-coroutine context!" << LL_ENDL; + } + return *current->mSelf; +} + +llcoro::Suspending::Suspending(): + mSuspended(LLCoros::sCurrentCoro.get()) +{ + // Revert mCurrentCoro to the value it had at the moment we last switched + // into this coroutine. + LLCoros::sCurrentCoro.reset(mSuspended->mPrev); +} + +llcoro::Suspending::~Suspending() +{ + // Okay, we're back, update our mPrev + mSuspended->mPrev = LLCoros::sCurrentCoro.get(); + // and reinstate our sCurrentCoro. + LLCoros::sCurrentCoro.reset(mSuspended); +} + LLCoros::LLCoros(): // MAINT-2724: default coroutine stack size too small on Windows. // Previously we used @@ -58,9 +96,9 @@ bool LLCoros::cleanup(const LLSD&) { // Has this coroutine exited (normal return, exception, exit() call) // since last tick? - if (mi->second->exited()) + if (mi->second->mCoro.exited()) { - LL_INFOS("LLCoros") << "LLCoros: cleaning up coroutine " << mi->first << LL_ENDL; + LL_INFOS("LLCoros") << "LLCoros: cleaning up coroutine " << mi->first << LL_ENDL; // The erase() call will invalidate its passed iterator value -- // so increment mi FIRST -- but pass its original value to // erase(). This is what postincrement is all about. @@ -94,7 +132,7 @@ std::string LLCoros::generateDistinctName(const std::string& prefix) const { if (mCoros.find(name) == mCoros.end()) { - LL_INFOS("LLCoros") << "LLCoros: launching coroutine " << name << LL_ENDL; + LL_INFOS("LLCoros") << "LLCoros: launching coroutine " << name << LL_ENDL; return name; } } @@ -114,20 +152,15 @@ bool LLCoros::kill(const std::string& name) return true; } -std::string LLCoros::getNameByID(const void* self_id) const +std::string LLCoros::getName() const { - // Walk the existing coroutines, looking for one from which the 'self_id' - // passed to us comes. - for (CoroMap::const_iterator mi(mCoros.begin()), mend(mCoros.end()); mi != mend; ++mi) + CoroData* current = sCurrentCoro.get(); + if (! current) { - namespace coro_private = boost::dcoroutines::detail; - if (static_cast<void*>(coro_private::coroutine_accessor::get_impl(const_cast<coro&>(*mi->second)).get()) - == self_id) - { - return mi->first; - } + // not in a coroutine + return ""; } - return ""; + return current->mName; } void LLCoros::setStackSize(S32 stacksize) @@ -136,10 +169,24 @@ void LLCoros::setStackSize(S32 stacksize) mStackSize = stacksize; } +// Top-level wrapper around caller's coroutine callable. This function accepts +// the coroutine library's implicit coro::self& parameter and sets sCurrentSelf +// but does not pass it down to the caller's callable. +void LLCoros::toplevel(coro::self& self, CoroData* data, const callable_t& callable) +{ + // capture the 'self' param in CoroData + data->mSelf = &self; + // run the code the caller actually wants in the coroutine + callable(); + // This cleanup isn't perfectly symmetrical with the way we initially set + // data->mPrev, but this is our last chance to reset mCurrentCoro. + sCurrentCoro.reset(data->mPrev); +} + /***************************************************************************** * MUST BE LAST *****************************************************************************/ -// Turn off MSVC optimizations for just LLCoros::launchImpl() -- see +// Turn off MSVC optimizations for just LLCoros::launch() -- see // DEV-32777. But MSVC doesn't support push/pop for optimization flags as it // does for warning suppression, and we really don't want to force // optimization ON for other code even in Debug or RelWithDebInfo builds. @@ -147,15 +194,33 @@ void LLCoros::setStackSize(S32 stacksize) #if LL_MSVC // work around broken optimizations #pragma warning(disable: 4748) +#pragma warning(disable: 4355) // 'this' used in initializer list: yes, intentionally #pragma optimize("", off) #endif // LL_MSVC -std::string LLCoros::launchImpl(const std::string& prefix, coro* newCoro) +LLCoros::CoroData::CoroData(CoroData* prev, const std::string& name, + const callable_t& callable, S32 stacksize): + mPrev(prev), + mName(name), + // Wrap the caller's callable in our toplevel() function so we can manage + // sCurrentCoro appropriately at startup and shutdown of each coroutine. + mCoro(boost::bind(toplevel, _1, this, callable), stacksize), + mSelf(0) +{ +} + +std::string LLCoros::launch(const std::string& prefix, const callable_t& callable) { std::string name(generateDistinctName(prefix)); + // pass the current value of sCurrentCoro as previous context + CoroData* newCoro = new CoroData(sCurrentCoro.get(), name, + callable, mStackSize); + // Store it in our pointer map mCoros.insert(name, newCoro); + // also set it as current + sCurrentCoro.reset(newCoro); /* Run the coroutine until its first wait, then return here */ - (*newCoro)(std::nothrow); + (newCoro->mCoro)(std::nothrow); return name; } diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h index 01ee11da1a..56eed8cafe 100755 --- a/indra/llcommon/llcoros.h +++ b/indra/llcommon/llcoros.h @@ -32,12 +32,17 @@ #include <boost/dcoroutine/coroutine.hpp> #include "llsingleton.h" #include <boost/ptr_container/ptr_map.hpp> +#include <boost/function.hpp> +#include <boost/thread/tss.hpp> #include <string> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/iteration/local.hpp> #include <stdexcept> +// forward-declare helper class +namespace llcoro +{ +class Suspending; +} + /** * Registry of named Boost.Coroutine instances * @@ -80,8 +85,8 @@ class LL_COMMON_API LLCoros: public LLSingleton<LLCoros> public: /// Canonical boost::dcoroutines::coroutine signature we use typedef boost::dcoroutines::coroutine<void()> coro; - /// Canonical 'self' type - typedef coro::self self; + /// Canonical callable type + typedef boost::function<void()> callable_t; /** * Create and start running a new coroutine with specified name. The name @@ -94,39 +99,33 @@ public: * { * public: * ... - * // Do NOT NOT NOT accept reference params other than 'self'! + * // Do NOT NOT NOT accept reference params! * // Pass by value only! - * void myCoroutineMethod(LLCoros::self& self, std::string, LLSD); + * void myCoroutineMethod(std::string, LLSD); * ... * }; * ... * std::string name = LLCoros::instance().launch( - * "mycoro", boost::bind(&MyClass::myCoroutineMethod, this, _1, + * "mycoro", boost::bind(&MyClass::myCoroutineMethod, this, * "somestring", LLSD(17)); * @endcode * - * Your function/method must accept LLCoros::self& as its first parameter. - * It can accept any other parameters you want -- but ONLY BY VALUE! - * Other reference parameters are a BAD IDEA! You Have Been Warned. See + * Your function/method can accept any parameters you want -- but ONLY BY + * VALUE! Reference parameters are a BAD IDEA! You Have Been Warned. See * DEV-32777 comments for an explanation. * - * Pass a callable that accepts the single LLCoros::self& parameter. It - * may work to pass a free function whose only parameter is 'self'; for - * all other cases use boost::bind(). Of course, for a non-static class - * method, the first parameter must be the class instance. Use the - * placeholder _1 for the 'self' parameter. Any other parameters should be - * passed via the bind() expression. + * Pass a nullary callable. It works to directly pass a nullary free + * function (or static method); for all other cases use boost::bind(). Of + * course, for a non-static class method, the first parameter must be the + * class instance. Any other parameters should be passed via the bind() + * expression. * * launch() tweaks the suggested name so it won't collide with any * existing coroutine instance, creates the coroutine instance, registers * it with the tweaked name and runs it until its first wait. At that * point it returns the tweaked name. */ - template <typename CALLABLE> - std::string launch(const std::string& prefix, const CALLABLE& callable) - { - return launchImpl(prefix, new coro(callable, mStackSize)); - } + std::string launch(const std::string& prefix, const callable_t& callable); /** * Abort a running coroutine by name. Normally, when a coroutine either @@ -138,33 +137,85 @@ public: bool kill(const std::string& name); /** - * From within a coroutine, pass its @c self object to look up the - * (tweaked) name string by which this coroutine is registered. Returns - * the empty string if not found (e.g. if the coroutine was launched by - * hand rather than using LLCoros::launch()). + * From within a coroutine, look up the (tweaked) name string by which + * this coroutine is registered. Returns the empty string if not found + * (e.g. if the coroutine was launched by hand rather than using + * LLCoros::launch()). */ - template <typename COROUTINE_SELF> - std::string getName(const COROUTINE_SELF& self) const - { - return getNameByID(self.get_id()); - } - - /// getName() by self.get_id() - std::string getNameByID(const void* self_id) const; + std::string getName() const; /// for delayed initialization void setStackSize(S32 stacksize); + /// get the current coro::self& for those who really really care + static coro::self& get_self(); + private: - friend class LLSingleton<LLCoros>; LLCoros(); - std::string launchImpl(const std::string& prefix, coro* newCoro); + friend class LLSingleton<LLCoros>; + friend class llcoro::Suspending; std::string generateDistinctName(const std::string& prefix) const; bool cleanup(const LLSD&); + struct CoroData; + static void no_cleanup(CoroData*); + static void toplevel(coro::self& self, CoroData* data, const callable_t& callable); S32 mStackSize; - typedef boost::ptr_map<std::string, coro> CoroMap; + + // coroutine-local storage, as it were: one per coro we track + struct CoroData + { + CoroData(CoroData* prev, const std::string& name, + const callable_t& callable, S32 stacksize); + + // The boost::dcoroutines library supports asymmetric coroutines. Every + // time we context switch out of a coroutine, we pass control to the + // previously-active one (or to the non-coroutine stack owned by the + // thread). So our management of the "current" coroutine must be able to + // restore the previous value when we're about to switch away. + CoroData* mPrev; + // tweaked name of the current coroutine + const std::string mName; + // the actual coroutine instance + LLCoros::coro mCoro; + // When the dcoroutine library calls a top-level callable, it implicitly + // passes coro::self& as the first parameter. All our consumer code used + // to explicitly pass coro::self& down through all levels of call stack, + // because at the leaf level we need it for context-switching. But since + // coroutines are based on cooperative switching, we can cause the + // top-level entry point to stash a pointer to the currently-running + // coroutine, and manage it appropriately as we switch out and back in. + // That eliminates the need to pass it as an explicit parameter down + // through every level, which is unfortunately viral in nature. Finding it + // implicitly rather than explicitly allows minor maintenance in which a + // leaf-level function adds a new async I/O call that suspends the calling + // coroutine, WITHOUT having to propagate coro::self& through every + // function signature down to that point -- and of course through every + // other caller of every such function. + LLCoros::coro::self* mSelf; + }; + typedef boost::ptr_map<std::string, CoroData> CoroMap; CoroMap mCoros; + + // identify the current coroutine's CoroData + static boost::thread_specific_ptr<LLCoros::CoroData> sCurrentCoro; +}; + +namespace llcoro +{ + +/// Instantiate one of these in a block surrounding any leaf point when +/// control literally switches away from this coroutine. +class Suspending +{ +public: + Suspending(); + ~Suspending(); + +private: + LLCoros::CoroData* mSuspended; }; +} // namespace llcoro + #endif /* ! defined(LL_LLCOROS_H) */ diff --git a/indra/llcommon/lleventcoro.cpp b/indra/llcommon/lleventcoro.cpp index 81cc33fbba..66cc7cada0 100755 --- a/indra/llcommon/lleventcoro.cpp +++ b/indra/llcommon/lleventcoro.cpp @@ -34,38 +34,63 @@ #include <map> // std headers // external library headers +#include <boost/dcoroutine/coroutine.hpp> +#include <boost/dcoroutine/future.hpp> // other Linden headers #include "llsdserialize.h" #include "llerror.h" #include "llcoros.h" -std::string LLEventDetail::listenerNameForCoroImpl(const void* self_id) +namespace { - // First, if this coroutine was launched by LLCoros::launch(), find that name. - std::string name(LLCoros::instance().getNameByID(self_id)); + +/** + * waitForEventOn() permits a coroutine to temporarily listen on an + * LLEventPump any number of times. We don't really want to have to ask + * the caller to label each such call with a distinct string; the whole + * point of waitForEventOn() is to present a nice sequential interface to + * the underlying LLEventPump-with-named-listeners machinery. So we'll use + * LLEventPump::inventName() to generate a distinct name for each + * temporary listener. On the other hand, because a given coroutine might + * call waitForEventOn() any number of times, we don't really want to + * consume an arbitrary number of generated inventName()s: that namespace, + * though large, is nonetheless finite. So we memoize an invented name for + * each distinct coroutine instance. + */ +std::string listenerNameForCoro() +{ + // If this coroutine was launched by LLCoros::launch(), find that name. + std::string name(LLCoros::instance().getName()); if (! name.empty()) { return name; } - // Apparently this coroutine wasn't launched by LLCoros::launch(). Check - // whether we have a memo for this self_id. - typedef std::map<const void*, std::string> MapType; - static MapType memo; - MapType::const_iterator found = memo.find(self_id); - if (found != memo.end()) - { - // this coroutine instance has called us before, reuse same name - return found->second; - } // this is the first time we've been called for this coroutine instance name = LLEventPump::inventName("coro"); - memo[self_id] = name; - LL_INFOS("LLEventCoro") << "listenerNameForCoroImpl(" << self_id << "): inventing coro name '" + LL_INFOS("LLEventCoro") << "listenerNameForCoro(): inventing coro name '" << name << "'" << LL_ENDL; return name; } -void LLEventDetail::storeToLLSDPath(LLSD& dest, const LLSD& rawPath, const LLSD& value) +/** + * Implement behavior described for postAndWait()'s @a replyPumpNamePath + * parameter: + * + * * If <tt>path.isUndefined()</tt>, do nothing. + * * If <tt>path.isString()</tt>, @a dest is an LLSD map: store @a value + * into <tt>dest[path.asString()]</tt>. + * * If <tt>path.isInteger()</tt>, @a dest is an LLSD array: store @a + * value into <tt>dest[path.asInteger()]</tt>. + * * If <tt>path.isArray()</tt>, iteratively apply the rules above to step + * down through the structure of @a dest. The last array entry in @a + * path specifies the entry in the lowest-level structure in @a dest + * into which to store @a value. + * + * @note + * In the degenerate case in which @a path is an empty array, @a dest will + * @em become @a value rather than @em containing it. + */ +void storeToLLSDPath(LLSD& dest, const LLSD& rawPath, const LLSD& value) { if (rawPath.isUndefined()) { @@ -118,6 +143,155 @@ void LLEventDetail::storeToLLSDPath(LLSD& dest, const LLSD& rawPath, const LLSD& *pdest = value; } +} // anonymous + +void llcoro::yield() +{ + // By viewer convention, we post an event on the "mainloop" LLEventPump + // each iteration of the main event-handling loop. So waiting for a single + // event on "mainloop" gives us a one-frame yield. + waitForEventOn("mainloop"); +} + +LLSD llcoro::postAndWait(const LLSD& event, const LLEventPumpOrPumpName& requestPump, + const LLEventPumpOrPumpName& replyPump, const LLSD& replyPumpNamePath) +{ + // declare the future + boost::dcoroutines::future<LLSD> future(LLCoros::get_self()); + // make a callback that will assign a value to the future, and listen on + // the specified LLEventPump with that callback + std::string listenerName(listenerNameForCoro()); + LLTempBoundListener connection( + replyPump.getPump().listen(listenerName, + voidlistener(boost::dcoroutines::make_callback(future)))); + // skip the "post" part if requestPump is default-constructed + if (requestPump) + { + // If replyPumpNamePath is non-empty, store the replyPump name in the + // request event. + LLSD modevent(event); + storeToLLSDPath(modevent, replyPumpNamePath, replyPump.getPump().getName()); + LL_DEBUGS("lleventcoro") << "postAndWait(): coroutine " << listenerName + << " posting to " << requestPump.getPump().getName() + << LL_ENDL; + + // *NOTE:Mani - Removed because modevent could contain user's hashed passwd. + // << ": " << modevent << LL_ENDL; + requestPump.getPump().post(modevent); + } + LL_DEBUGS("lleventcoro") << "postAndWait(): coroutine " << listenerName + << " about to wait on LLEventPump " << replyPump.getPump().getName() + << LL_ENDL; + // trying to dereference ("resolve") the future makes us wait for it + LLSD value; + { + // instantiate Suspending to manage the "current" coroutine + llcoro::Suspending suspended; + value = *future; + } // destroy Suspending as soon as we're back + LL_DEBUGS("lleventcoro") << "postAndWait(): coroutine " << listenerName + << " resuming with " << value << LL_ENDL; + // returning should disconnect the connection + return value; +} + +namespace +{ + +/** + * This helper is specifically for the two-pump version of waitForEventOn(). + * We use a single future object, but we want to listen on two pumps with it. + * Since we must still adapt from (the callable constructed by) + * boost::dcoroutines::make_callback() (void return) to provide an event + * listener (bool return), we've adapted VoidListener for the purpose. The + * basic idea is that we construct a distinct instance of WaitForEventOnHelper + * -- binding different instance data -- for each of the pumps. Then, when a + * pump delivers an LLSD value to either WaitForEventOnHelper, it can combine + * that LLSD with its discriminator to feed the future object. + */ +template <typename LISTENER> +class WaitForEventOnHelper +{ +public: + WaitForEventOnHelper(const LISTENER& listener, int discriminator): + mListener(listener), + mDiscrim(discriminator) + {} + // this signature is required for an LLEventPump listener + bool operator()(const LLSD& event) + { + // our future object is defined to accept LLEventWithID + mListener(LLEventWithID(event, mDiscrim)); + // don't swallow the event, let other listeners see it + return false; + } +private: + LISTENER mListener; + const int mDiscrim; +}; + +/// WaitForEventOnHelper type-inference helper +template <typename LISTENER> +WaitForEventOnHelper<LISTENER> wfeoh(const LISTENER& listener, int discriminator) +{ + return WaitForEventOnHelper<LISTENER>(listener, discriminator); +} + +} // anonymous + +namespace llcoro +{ + +LLEventWithID postAndWait2(const LLSD& event, + const LLEventPumpOrPumpName& requestPump, + const LLEventPumpOrPumpName& replyPump0, + const LLEventPumpOrPumpName& replyPump1, + const LLSD& replyPump0NamePath, + const LLSD& replyPump1NamePath) +{ + // declare the future + boost::dcoroutines::future<LLEventWithID> future(LLCoros::get_self()); + // either callback will assign a value to this future; listen on + // each specified LLEventPump with a callback + std::string name(listenerNameForCoro()); + LLTempBoundListener connection0( + replyPump0.getPump().listen(name + "a", + wfeoh(boost::dcoroutines::make_callback(future), 0))); + LLTempBoundListener connection1( + replyPump1.getPump().listen(name + "b", + wfeoh(boost::dcoroutines::make_callback(future), 1))); + // skip the "post" part if requestPump is default-constructed + if (requestPump) + { + // If either replyPumpNamePath is non-empty, store the corresponding + // replyPump name in the request event. + LLSD modevent(event); + storeToLLSDPath(modevent, replyPump0NamePath, + replyPump0.getPump().getName()); + storeToLLSDPath(modevent, replyPump1NamePath, + replyPump1.getPump().getName()); + LL_DEBUGS("lleventcoro") << "postAndWait2(): coroutine " << name + << " posting to " << requestPump.getPump().getName() + << ": " << modevent << LL_ENDL; + requestPump.getPump().post(modevent); + } + LL_DEBUGS("lleventcoro") << "postAndWait2(): coroutine " << name + << " about to wait on LLEventPumps " << replyPump0.getPump().getName() + << ", " << replyPump1.getPump().getName() << LL_ENDL; + // trying to dereference ("resolve") the future makes us wait for it + LLEventWithID value; + { + // instantiate Suspending to manage "current" coroutine + llcoro::Suspending suspended; + value = *future; + } // destroy Suspending as soon as we're back + LL_DEBUGS("lleventcoro") << "postAndWait(): coroutine " << name + << " resuming with (" << value.first << ", " << value.second << ")" + << LL_ENDL; + // returning should disconnect both connections + return value; +} + LLSD errorException(const LLEventWithID& result, const std::string& desc) { // If the result arrived on the error pump (pump 1), instead of @@ -144,3 +318,5 @@ LLSD errorLog(const LLEventWithID& result, const std::string& desc) // A simple return must therefore be from the reply pump (pump 0). return result.first; } + +} // namespace llcoro diff --git a/indra/llcommon/lleventcoro.h b/indra/llcommon/lleventcoro.h index abbeeaa373..e2ce4bb193 100755 --- a/indra/llcommon/lleventcoro.h +++ b/indra/llcommon/lleventcoro.h @@ -29,8 +29,6 @@ #if ! defined(LL_LLEVENTCORO_H) #define LL_LLEVENTCORO_H -#include <boost/dcoroutine/coroutine.hpp> -#include <boost/dcoroutine/future.hpp> #include <boost/optional.hpp> #include <string> #include <stdexcept> @@ -74,13 +72,16 @@ private: boost::optional<LLEventPump&> mPump; }; +namespace llcoro +{ + /// This is an adapter for a signature like void LISTENER(const LLSD&), which /// isn't a valid LLEventPump listener: such listeners should return bool. template <typename LISTENER> -class LLVoidListener +class VoidListener { public: - LLVoidListener(const LISTENER& listener): + VoidListener(const LISTENER& listener): mListener(listener) {} bool operator()(const LLSD& event) @@ -93,65 +94,19 @@ private: LISTENER mListener; }; -/// LLVoidListener helper function to infer the type of the LISTENER +/// VoidListener helper function to infer the type of the LISTENER template <typename LISTENER> -LLVoidListener<LISTENER> voidlistener(const LISTENER& listener) +VoidListener<LISTENER> voidlistener(const LISTENER& listener) { - return LLVoidListener<LISTENER>(listener); + return VoidListener<LISTENER>(listener); } -namespace LLEventDetail -{ - /// Implementation for listenerNameForCoro(), see below - LL_COMMON_API std::string listenerNameForCoroImpl(const void* self_id); - - /** - * waitForEventOn() permits a coroutine to temporarily listen on an - * LLEventPump any number of times. We don't really want to have to ask - * the caller to label each such call with a distinct string; the whole - * point of waitForEventOn() is to present a nice sequential interface to - * the underlying LLEventPump-with-named-listeners machinery. So we'll use - * LLEventPump::inventName() to generate a distinct name for each - * temporary listener. On the other hand, because a given coroutine might - * call waitForEventOn() any number of times, we don't really want to - * consume an arbitrary number of generated inventName()s: that namespace, - * though large, is nonetheless finite. So we memoize an invented name for - * each distinct coroutine instance (each different 'self' object). We - * can't know the type of 'self', because it depends on the coroutine - * body's signature. So we cast its address to void*, looking for distinct - * pointer values. Yes, that means that an early coroutine could cache a - * value here, then be destroyed, only to be supplanted by a later - * coroutine (of the same or different type), and we'll end up - * "recognizing" the second one and reusing the listener name -- but - * that's okay, since it won't collide with any listener name used by the - * earlier coroutine since that earlier coroutine no longer exists. - */ - template <typename COROUTINE_SELF> - std::string listenerNameForCoro(COROUTINE_SELF& self) - { - return listenerNameForCoroImpl(self.get_id()); - } - - /** - * Implement behavior described for postAndWait()'s @a replyPumpNamePath - * parameter: - * - * * If <tt>path.isUndefined()</tt>, do nothing. - * * If <tt>path.isString()</tt>, @a dest is an LLSD map: store @a value - * into <tt>dest[path.asString()]</tt>. - * * If <tt>path.isInteger()</tt>, @a dest is an LLSD array: store @a - * value into <tt>dest[path.asInteger()]</tt>. - * * If <tt>path.isArray()</tt>, iteratively apply the rules above to step - * down through the structure of @a dest. The last array entry in @a - * path specifies the entry in the lowest-level structure in @a dest - * into which to store @a value. - * - * @note - * In the degenerate case in which @a path is an empty array, @a dest will - * @em become @a value rather than @em containing it. - */ - LL_COMMON_API void storeToLLSDPath(LLSD& dest, const LLSD& path, const LLSD& value); -} // namespace LLEventDetail +/** + * Yield control from a coroutine for one "mainloop" tick. If your coroutine + * runs without suspending for nontrivial time, sprinkle in calls to this + * function to avoid stalling the rest of the viewer processing. + */ +void yield(); /** * Post specified LLSD event on the specified LLEventPump, then wait for a @@ -159,7 +114,7 @@ namespace LLEventDetail * convenience: the difference between this function and the sequence * @code * requestPump.post(myEvent); - * LLSD reply = waitForEventOn(self, replyPump); + * LLSD reply = waitForEventOn(replyPump); * @endcode * is that the sequence above fails if the reply is posted immediately on * @a replyPump, that is, before <tt>requestPump.post()</tt> returns. In the @@ -201,97 +156,25 @@ namespace LLEventDetail * @a replyPumpNamePath specifies the entry in the lowest-level structure in * @a event into which to store <tt>replyPump.getName()</tt>. */ -template <typename SELF> -LLSD postAndWait(SELF& self, const LLSD& event, const LLEventPumpOrPumpName& requestPump, - const LLEventPumpOrPumpName& replyPump, const LLSD& replyPumpNamePath=LLSD()) -{ - // declare the future - boost::dcoroutines::future<LLSD> future(self); - // make a callback that will assign a value to the future, and listen on - // the specified LLEventPump with that callback - std::string listenerName(LLEventDetail::listenerNameForCoro(self)); - LLTempBoundListener connection( - replyPump.getPump().listen(listenerName, - voidlistener(boost::dcoroutines::make_callback(future)))); - // skip the "post" part if requestPump is default-constructed - if (requestPump) - { - // If replyPumpNamePath is non-empty, store the replyPump name in the - // request event. - LLSD modevent(event); - LLEventDetail::storeToLLSDPath(modevent, replyPumpNamePath, replyPump.getPump().getName()); - LL_DEBUGS("lleventcoro") << "postAndWait(): coroutine " << listenerName - << " posting to " << requestPump.getPump().getName() - << LL_ENDL; - - // *NOTE:Mani - Removed because modevent could contain user's hashed passwd. - // << ": " << modevent << LL_ENDL; - requestPump.getPump().post(modevent); - } - LL_DEBUGS("lleventcoro") << "postAndWait(): coroutine " << listenerName - << " about to wait on LLEventPump " << replyPump.getPump().getName() - << LL_ENDL; - // trying to dereference ("resolve") the future makes us wait for it - LLSD value(*future); - LL_DEBUGS("lleventcoro") << "postAndWait(): coroutine " << listenerName - << " resuming with " << value << LL_ENDL; - // returning should disconnect the connection - return value; -} +LLSD postAndWait(const LLSD& event, const LLEventPumpOrPumpName& requestPump, + const LLEventPumpOrPumpName& replyPump, const LLSD& replyPumpNamePath=LLSD()); /// Wait for the next event on the specified LLEventPump. Pass either the /// LLEventPump& or its string name. -template <typename SELF> -LLSD waitForEventOn(SELF& self, const LLEventPumpOrPumpName& pump) +inline +LLSD waitForEventOn(const LLEventPumpOrPumpName& pump) { // This is now a convenience wrapper for postAndWait(). - return postAndWait(self, LLSD(), LLEventPumpOrPumpName(), pump); + return postAndWait(LLSD(), LLEventPumpOrPumpName(), pump); } +} // namespace llcoro + /// return type for two-pump variant of waitForEventOn() typedef std::pair<LLSD, int> LLEventWithID; -namespace LLEventDetail +namespace llcoro { - /** - * This helper is specifically for the two-pump version of waitForEventOn(). - * We use a single future object, but we want to listen on two pumps with it. - * Since we must still adapt from (the callable constructed by) - * boost::dcoroutines::make_callback() (void return) to provide an event - * listener (bool return), we've adapted LLVoidListener for the purpose. The - * basic idea is that we construct a distinct instance of WaitForEventOnHelper - * -- binding different instance data -- for each of the pumps. Then, when a - * pump delivers an LLSD value to either WaitForEventOnHelper, it can combine - * that LLSD with its discriminator to feed the future object. - */ - template <typename LISTENER> - class WaitForEventOnHelper - { - public: - WaitForEventOnHelper(const LISTENER& listener, int discriminator): - mListener(listener), - mDiscrim(discriminator) - {} - // this signature is required for an LLEventPump listener - bool operator()(const LLSD& event) - { - // our future object is defined to accept LLEventWithID - mListener(LLEventWithID(event, mDiscrim)); - // don't swallow the event, let other listeners see it - return false; - } - private: - LISTENER mListener; - const int mDiscrim; - }; - - /// WaitForEventOnHelper type-inference helper - template <typename LISTENER> - WaitForEventOnHelper<LISTENER> wfeoh(const LISTENER& listener, int discriminator) - { - return WaitForEventOnHelper<LISTENER>(listener, discriminator); - } -} // namespace LLEventDetail /** * This function waits for a reply on either of two specified LLEventPumps. @@ -313,7 +196,7 @@ namespace LLEventDetail * I'd have preferred to overload the name postAndWait() for both signatures. * But consider the following ambiguous call: * @code - * postAndWait(self, LLSD(), requestPump, replyPump, "someString"); + * postAndWait(LLSD(), requestPump, replyPump, "someString"); * @endcode * "someString" could be converted to either LLSD (@a replyPumpNamePath for * the single-pump function) or LLEventOrPumpName (@a replyPump1 for two-pump @@ -322,69 +205,29 @@ namespace LLEventDetail * It seems less burdensome to write postAndWait2() than to write either * LLSD("someString") or LLEventOrPumpName("someString"). */ -template <typename SELF> -LLEventWithID postAndWait2(SELF& self, const LLSD& event, +LLEventWithID postAndWait2(const LLSD& event, const LLEventPumpOrPumpName& requestPump, const LLEventPumpOrPumpName& replyPump0, const LLEventPumpOrPumpName& replyPump1, const LLSD& replyPump0NamePath=LLSD(), - const LLSD& replyPump1NamePath=LLSD()) -{ - // declare the future - boost::dcoroutines::future<LLEventWithID> future(self); - // either callback will assign a value to this future; listen on - // each specified LLEventPump with a callback - std::string name(LLEventDetail::listenerNameForCoro(self)); - LLTempBoundListener connection0( - replyPump0.getPump().listen(name + "a", - LLEventDetail::wfeoh(boost::dcoroutines::make_callback(future), 0))); - LLTempBoundListener connection1( - replyPump1.getPump().listen(name + "b", - LLEventDetail::wfeoh(boost::dcoroutines::make_callback(future), 1))); - // skip the "post" part if requestPump is default-constructed - if (requestPump) - { - // If either replyPumpNamePath is non-empty, store the corresponding - // replyPump name in the request event. - LLSD modevent(event); - LLEventDetail::storeToLLSDPath(modevent, replyPump0NamePath, - replyPump0.getPump().getName()); - LLEventDetail::storeToLLSDPath(modevent, replyPump1NamePath, - replyPump1.getPump().getName()); - LL_DEBUGS("lleventcoro") << "postAndWait2(): coroutine " << name - << " posting to " << requestPump.getPump().getName() - << ": " << modevent << LL_ENDL; - requestPump.getPump().post(modevent); - } - LL_DEBUGS("lleventcoro") << "postAndWait2(): coroutine " << name - << " about to wait on LLEventPumps " << replyPump0.getPump().getName() - << ", " << replyPump1.getPump().getName() << LL_ENDL; - // trying to dereference ("resolve") the future makes us wait for it - LLEventWithID value(*future); - LL_DEBUGS("lleventcoro") << "postAndWait(): coroutine " << name - << " resuming with (" << value.first << ", " << value.second << ")" - << LL_ENDL; - // returning should disconnect both connections - return value; -} + const LLSD& replyPump1NamePath=LLSD()); /** * Wait for the next event on either of two specified LLEventPumps. */ -template <typename SELF> +inline LLEventWithID -waitForEventOn(SELF& self, - const LLEventPumpOrPumpName& pump0, const LLEventPumpOrPumpName& pump1) +waitForEventOn(const LLEventPumpOrPumpName& pump0, const LLEventPumpOrPumpName& pump1) { // This is now a convenience wrapper for postAndWait2(). - return postAndWait2(self, LLSD(), LLEventPumpOrPumpName(), pump0, pump1); + return postAndWait2(LLSD(), LLEventPumpOrPumpName(), pump0, pump1); } /** * Helper for the two-pump variant of waitForEventOn(), e.g.: * * @code - * LLSD reply = errorException(waitForEventOn(self, replyPump, errorPump), + * LLSD reply = errorException(waitForEventOn(replyPump, errorPump), * "error response from login.cgi"); * @endcode * @@ -400,6 +243,8 @@ waitForEventOn(SELF& self, */ LLSD errorException(const LLEventWithID& result, const std::string& desc); +} // namespace llcoro + /** * Exception thrown by errorException(). We don't call this LLEventError * because it's not an error in event processing: rather, this exception @@ -420,12 +265,17 @@ private: LLSD mData; }; +namespace llcoro +{ + /** * Like errorException(), save that this trips a fatal error using LL_ERRS * rather than throwing an exception. */ LL_COMMON_API LLSD errorLog(const LLEventWithID& result, const std::string& desc); +} // namespace llcoro + /** * Certain event APIs require the name of an LLEventPump on which they should * post results. While it works to invent a distinct name and let @@ -454,26 +304,16 @@ public: /** * Wait for an event on this LLEventPump. - * - * @note - * The other major usage pattern we considered was to bind @c self at - * LLCoroEventPump construction time, which would avoid passing the - * parameter to each wait() call. But if we were going to bind @c self as - * a class member, we'd need to specify a class template parameter - * indicating its type. The big advantage of passing it to the wait() call - * is that the type can be implicit. */ - template <typename SELF> - LLSD wait(SELF& self) + LLSD wait() { - return waitForEventOn(self, mPump); + return llcoro::waitForEventOn(mPump); } - template <typename SELF> - LLSD postAndWait(SELF& self, const LLSD& event, const LLEventPumpOrPumpName& requestPump, + LLSD postAndWait(const LLSD& event, const LLEventPumpOrPumpName& requestPump, const LLSD& replyPumpNamePath=LLSD()) { - return ::postAndWait(self, event, requestPump, mPump, replyPumpNamePath); + return llcoro::postAndWait(event, requestPump, mPump, replyPumpNamePath); } private: @@ -509,57 +349,51 @@ public: /// request pump 1 LLEventPump& getPump1() { return mPump1; } - /// waitForEventOn(self, either of our two LLEventPumps) - template <typename SELF> - LLEventWithID wait(SELF& self) + /// waitForEventOn(either of our two LLEventPumps) + LLEventWithID wait() { - return waitForEventOn(self, mPump0, mPump1); + return llcoro::waitForEventOn(mPump0, mPump1); } - /// errorException(wait(self)) - template <typename SELF> - LLSD waitWithException(SELF& self) + /// errorException(wait()) + LLSD waitWithException() { - return errorException(wait(self), std::string("Error event on ") + getName1()); + return llcoro::errorException(wait(), std::string("Error event on ") + getName1()); } - /// errorLog(wait(self)) - template <typename SELF> - LLSD waitWithLog(SELF& self) + /// errorLog(wait()) + LLSD waitWithLog() { - return errorLog(wait(self), std::string("Error event on ") + getName1()); + return llcoro::errorLog(wait(), std::string("Error event on ") + getName1()); } - template <typename SELF> - LLEventWithID postAndWait(SELF& self, const LLSD& event, + LLEventWithID postAndWait(const LLSD& event, const LLEventPumpOrPumpName& requestPump, const LLSD& replyPump0NamePath=LLSD(), const LLSD& replyPump1NamePath=LLSD()) { - return postAndWait2(self, event, requestPump, mPump0, mPump1, - replyPump0NamePath, replyPump1NamePath); + return llcoro::postAndWait2(event, requestPump, mPump0, mPump1, + replyPump0NamePath, replyPump1NamePath); } - template <typename SELF> - LLSD postAndWaitWithException(SELF& self, const LLSD& event, + LLSD postAndWaitWithException(const LLSD& event, const LLEventPumpOrPumpName& requestPump, const LLSD& replyPump0NamePath=LLSD(), const LLSD& replyPump1NamePath=LLSD()) { - return errorException(postAndWait(self, event, requestPump, - replyPump0NamePath, replyPump1NamePath), - std::string("Error event on ") + getName1()); + return llcoro::errorException(postAndWait(event, requestPump, + replyPump0NamePath, replyPump1NamePath), + std::string("Error event on ") + getName1()); } - template <typename SELF> - LLSD postAndWaitWithLog(SELF& self, const LLSD& event, + LLSD postAndWaitWithLog(const LLSD& event, const LLEventPumpOrPumpName& requestPump, const LLSD& replyPump0NamePath=LLSD(), const LLSD& replyPump1NamePath=LLSD()) { - return errorLog(postAndWait(self, event, requestPump, - replyPump0NamePath, replyPump1NamePath), - std::string("Error event on ") + getName1()); + return llcoro::errorLog(postAndWait(event, requestPump, + replyPump0NamePath, replyPump1NamePath), + std::string("Error event on ") + getName1()); } private: diff --git a/indra/llcommon/tests/lleventcoro_test.cpp b/indra/llcommon/tests/lleventcoro_test.cpp index 2c131de4e0..00be5035f2 100755 --- a/indra/llcommon/tests/lleventcoro_test.cpp +++ b/indra/llcommon/tests/lleventcoro_test.cpp @@ -59,6 +59,7 @@ // http://www.boost.org/LICENSE_1_0.txt) /*****************************************************************************/ +#define BOOST_RESULT_OF_USE_TR1 1 // On some platforms, Boost.Coroutine must #define magic symbols before // #including platform-API headers. Naturally, that's ineffective unless the // Boost.Coroutine #include is the *first* #include of the platform header. @@ -84,9 +85,12 @@ #include "llevents.h" #include "tests/wrapllerrs.h" #include "stringize.h" +#include "llcoros.h" #include "lleventcoro.h" #include "../test/debug.h" +using namespace llcoro; + /***************************************************************************** * from the banana.cpp example program borrowed for test<1>() *****************************************************************************/ @@ -123,9 +127,6 @@ typedef coroutine<std::string::iterator(void)> match_coroutine_type; /***************************************************************************** * Test helpers *****************************************************************************/ -// I suspect this will be typical of coroutines used in Linden software -typedef boost::dcoroutines::coroutine<void()> coroutine_type; - /// Simulate an event API whose response is immediate: sent on receipt of the /// initial request, rather than after some delay. This is the case that /// distinguishes postAndWait() from calling post(), then calling @@ -164,306 +165,7 @@ private: *****************************************************************************/ namespace tut { - struct coroutine_data - { - // Define coroutine bodies as methods here so they can use ensure*() - - void explicit_wait(coroutine_type::self& self) - { - BEGIN - { - // ... do whatever preliminary stuff must happen ... - - // declare the future - boost::dcoroutines::future<LLSD> future(self); - // tell the future what to wait for - LLTempBoundListener connection( - LLEventPumps::instance().obtain("source").listen("coro", voidlistener(boost::dcoroutines::make_callback(future)))); - ensure("Not yet", ! future); - // attempting to dereference ("resolve") the future causes the calling - // coroutine to wait for it - debug("about to wait"); - result = *future; - ensure("Got it", future); - } - END - } - - void waitForEventOn1(coroutine_type::self& self) - { - BEGIN - { - result = waitForEventOn(self, "source"); - } - END - } - - void waitForEventOn2(coroutine_type::self& self) - { - BEGIN - { - LLEventWithID pair = waitForEventOn(self, "reply", "error"); - result = pair.first; - which = pair.second; - debug(STRINGIZE("result = " << result << ", which = " << which)); - } - END - } - - void postAndWait1(coroutine_type::self& self) - { - BEGIN - { - result = postAndWait(self, - LLSDMap("value", 17), // request event - immediateAPI.getPump(), // requestPump - "reply1", // replyPump - "reply"); // request["reply"] = name - } - END - } - - void postAndWait2(coroutine_type::self& self) - { - BEGIN - { - LLEventWithID pair = ::postAndWait2(self, - LLSDMap("value", 18), - immediateAPI.getPump(), - "reply2", - "error2", - "reply", - "error"); - result = pair.first; - which = pair.second; - debug(STRINGIZE("result = " << result << ", which = " << which)); - } - END - } - - void postAndWait2_1(coroutine_type::self& self) - { - BEGIN - { - LLEventWithID pair = ::postAndWait2(self, - LLSDMap("value", 18)("fail", LLSD()), - immediateAPI.getPump(), - "reply2", - "error2", - "reply", - "error"); - result = pair.first; - which = pair.second; - debug(STRINGIZE("result = " << result << ", which = " << which)); - } - END - } - - void coroPump(coroutine_type::self& self) - { - BEGIN - { - LLCoroEventPump waiter; - replyName = waiter.getName(); - result = waiter.wait(self); - } - END - } - - void coroPumpPost(coroutine_type::self& self) - { - BEGIN - { - LLCoroEventPump waiter; - result = waiter.postAndWait(self, LLSDMap("value", 17), - immediateAPI.getPump(), "reply"); - } - END - } - - void coroPumps(coroutine_type::self& self) - { - BEGIN - { - LLCoroEventPumps waiter; - replyName = waiter.getName0(); - errorName = waiter.getName1(); - LLEventWithID pair(waiter.wait(self)); - result = pair.first; - which = pair.second; - } - END - } - - void coroPumpsNoEx(coroutine_type::self& self) - { - BEGIN - { - LLCoroEventPumps waiter; - replyName = waiter.getName0(); - errorName = waiter.getName1(); - result = waiter.waitWithException(self); - } - END - } - - void coroPumpsEx(coroutine_type::self& self) - { - BEGIN - { - LLCoroEventPumps waiter; - replyName = waiter.getName0(); - errorName = waiter.getName1(); - try - { - result = waiter.waitWithException(self); - debug("no exception"); - } - catch (const LLErrorEvent& e) - { - debug(STRINGIZE("exception " << e.what())); - errordata = e.getData(); - } - } - END - } - - void coroPumpsNoLog(coroutine_type::self& self) - { - BEGIN - { - LLCoroEventPumps waiter; - replyName = waiter.getName0(); - errorName = waiter.getName1(); - result = waiter.waitWithLog(self); - } - END - } - - void coroPumpsLog(coroutine_type::self& self) - { - BEGIN - { - LLCoroEventPumps waiter; - replyName = waiter.getName0(); - errorName = waiter.getName1(); - WrapLLErrs capture; - try - { - result = waiter.waitWithLog(self); - debug("no exception"); - } - catch (const WrapLLErrs::FatalException& e) - { - debug(STRINGIZE("exception " << e.what())); - threw = e.what(); - } - } - END - } - - void coroPumpsPost(coroutine_type::self& self) - { - BEGIN - { - LLCoroEventPumps waiter; - LLEventWithID pair(waiter.postAndWait(self, LLSDMap("value", 23), - immediateAPI.getPump(), "reply", "error")); - result = pair.first; - which = pair.second; - } - END - } - - void coroPumpsPost_1(coroutine_type::self& self) - { - BEGIN - { - LLCoroEventPumps waiter; - LLEventWithID pair( - waiter.postAndWait(self, LLSDMap("value", 23)("fail", LLSD()), - immediateAPI.getPump(), "reply", "error")); - result = pair.first; - which = pair.second; - } - END - } - - void coroPumpsPostNoEx(coroutine_type::self& self) - { - BEGIN - { - LLCoroEventPumps waiter; - result = waiter.postAndWaitWithException(self, LLSDMap("value", 8), - immediateAPI.getPump(), "reply", "error"); - } - END - } - - void coroPumpsPostEx(coroutine_type::self& self) - { - BEGIN - { - LLCoroEventPumps waiter; - try - { - result = waiter.postAndWaitWithException(self, - LLSDMap("value", 9)("fail", LLSD()), - immediateAPI.getPump(), "reply", "error"); - debug("no exception"); - } - catch (const LLErrorEvent& e) - { - debug(STRINGIZE("exception " << e.what())); - errordata = e.getData(); - } - } - END - } - - void coroPumpsPostNoLog(coroutine_type::self& self) - { - BEGIN - { - LLCoroEventPumps waiter; - result = waiter.postAndWaitWithLog(self, LLSDMap("value", 30), - immediateAPI.getPump(), "reply", "error"); - } - END - } - - void coroPumpsPostLog(coroutine_type::self& self) - { - BEGIN - { - LLCoroEventPumps waiter; - WrapLLErrs capture; - try - { - result = waiter.postAndWaitWithLog(self, - LLSDMap("value", 31)("fail", LLSD()), - immediateAPI.getPump(), "reply", "error"); - debug("no exception"); - } - catch (const WrapLLErrs::FatalException& e) - { - debug(STRINGIZE("exception " << e.what())); - threw = e.what(); - } - } - END - } - - void ensure_done(coroutine_type& coro) - { - ensure("coroutine complete", ! coro); - } - - ImmediateAPI immediateAPI; - std::string replyName, errorName, threw; - LLSD result, errordata; - int which; - }; + struct coroutine_data {}; typedef test_group<coroutine_data> coroutine_group; typedef coroutine_group::object object; coroutine_group coroutinegrp("coroutine"); @@ -513,16 +215,56 @@ namespace tut ensure("done", ! matcher); } + // use static data so we can intersperse coroutine functions with the + // tests that engage them + ImmediateAPI immediateAPI; + std::string replyName, errorName, threw; + LLSD result, errordata; + int which; + + // reinit vars at the start of each test + void clear() + { + replyName.clear(); + errorName.clear(); + threw.clear(); + result = LLSD(); + errordata = LLSD(); + which = 0; + } + + void explicit_wait(boost::dcoroutines::coroutine<void()>::self& self) + { + BEGIN + { + // ... do whatever preliminary stuff must happen ... + + // declare the future + boost::dcoroutines::future<LLSD> future(self); + // tell the future what to wait for + LLTempBoundListener connection( + LLEventPumps::instance().obtain("source").listen("coro", voidlistener(boost::dcoroutines::make_callback(future)))); + ensure("Not yet", ! future); + // attempting to dereference ("resolve") the future causes the calling + // coroutine to wait for it + debug("about to wait"); + result = *future; + ensure("Got it", future); + } + END + } + template<> template<> void object::test<2>() { + clear(); set_test_name("explicit_wait"); DEBUG; // Construct the coroutine instance that will run explicit_wait. // Pass the ctor a callable that accepts the coroutine_type::self // param passed by the library. - coroutine_type coro(boost::bind(&coroutine_data::explicit_wait, this, _1)); + boost::dcoroutines::coroutine<void()> coro(explicit_wait); // Start the coroutine coro(std::nothrow); // When the coroutine waits for the event pump, it returns here. @@ -530,37 +272,56 @@ namespace tut // Satisfy the wait. LLEventPumps::instance().obtain("source").post("received"); // Now wait for the coroutine to complete. - ensure_done(coro); + ensure("coroutine complete", ! coro); // ensure the coroutine ran and woke up again with the intended result ensure_equals(result.asString(), "received"); } + void waitForEventOn1() + { + BEGIN + { + result = waitForEventOn("source"); + } + END + } + template<> template<> void object::test<3>() { + clear(); set_test_name("waitForEventOn1"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::waitForEventOn1, this, _1)); - coro(std::nothrow); + LLCoros::instance().launch("test<3>", waitForEventOn1); debug("about to send"); LLEventPumps::instance().obtain("source").post("received"); debug("back from send"); - ensure_done(coro); ensure_equals(result.asString(), "received"); } + void waitForEventOn2() + { + BEGIN + { + LLEventWithID pair = waitForEventOn("reply", "error"); + result = pair.first; + which = pair.second; + debug(STRINGIZE("result = " << result << ", which = " << which)); + } + END + } + template<> template<> void object::test<4>() { + clear(); set_test_name("waitForEventOn2 reply"); { DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::waitForEventOn2, this, _1)); - coro(std::nothrow); + LLCoros::instance().launch("test<4>", waitForEventOn2); debug("about to send"); LLEventPumps::instance().obtain("reply").post("received"); debug("back from send"); - ensure_done(coro); } ensure_equals(result.asString(), "received"); ensure_equals("which pump", which, 0); @@ -569,43 +330,65 @@ namespace tut template<> template<> void object::test<5>() { + clear(); set_test_name("waitForEventOn2 error"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::waitForEventOn2, this, _1)); - coro(std::nothrow); + LLCoros::instance().launch("test<5>", waitForEventOn2); debug("about to send"); LLEventPumps::instance().obtain("error").post("badness"); debug("back from send"); - ensure_done(coro); ensure_equals(result.asString(), "badness"); ensure_equals("which pump", which, 1); } + void coroPump() + { + BEGIN + { + LLCoroEventPump waiter; + replyName = waiter.getName(); + result = waiter.wait(); + } + END + } + template<> template<> void object::test<6>() { + clear(); set_test_name("coroPump"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPump, this, _1)); - coro(std::nothrow); + LLCoros::instance().launch("test<6>", coroPump); debug("about to send"); LLEventPumps::instance().obtain(replyName).post("received"); debug("back from send"); - ensure_done(coro); ensure_equals(result.asString(), "received"); } + void coroPumps() + { + BEGIN + { + LLCoroEventPumps waiter; + replyName = waiter.getName0(); + errorName = waiter.getName1(); + LLEventWithID pair(waiter.wait()); + result = pair.first; + which = pair.second; + } + END + } + template<> template<> void object::test<7>() { + clear(); set_test_name("coroPumps reply"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPumps, this, _1)); - coro(std::nothrow); + LLCoros::instance().launch("test<7>", coroPumps); debug("about to send"); LLEventPumps::instance().obtain(replyName).post("received"); debug("back from send"); - ensure_done(coro); ensure_equals(result.asString(), "received"); ensure_equals("which pump", which, 0); } @@ -613,188 +396,389 @@ namespace tut template<> template<> void object::test<8>() { + clear(); set_test_name("coroPumps error"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPumps, this, _1)); - coro(std::nothrow); + LLCoros::instance().launch("test<8>", coroPumps); debug("about to send"); LLEventPumps::instance().obtain(errorName).post("badness"); debug("back from send"); - ensure_done(coro); ensure_equals(result.asString(), "badness"); ensure_equals("which pump", which, 1); } + void coroPumpsNoEx() + { + BEGIN + { + LLCoroEventPumps waiter; + replyName = waiter.getName0(); + errorName = waiter.getName1(); + result = waiter.waitWithException(); + } + END + } + template<> template<> void object::test<9>() { + clear(); set_test_name("coroPumpsNoEx"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPumpsNoEx, this, _1)); - coro(std::nothrow); + LLCoros::instance().launch("test<9>", coroPumpsNoEx); debug("about to send"); LLEventPumps::instance().obtain(replyName).post("received"); debug("back from send"); - ensure_done(coro); ensure_equals(result.asString(), "received"); } + void coroPumpsEx() + { + BEGIN + { + LLCoroEventPumps waiter; + replyName = waiter.getName0(); + errorName = waiter.getName1(); + try + { + result = waiter.waitWithException(); + debug("no exception"); + } + catch (const LLErrorEvent& e) + { + debug(STRINGIZE("exception " << e.what())); + errordata = e.getData(); + } + } + END + } + template<> template<> void object::test<10>() { + clear(); set_test_name("coroPumpsEx"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPumpsEx, this, _1)); - coro(std::nothrow); + LLCoros::instance().launch("test<10>", coroPumpsEx); debug("about to send"); LLEventPumps::instance().obtain(errorName).post("badness"); debug("back from send"); - ensure_done(coro); ensure("no result", result.isUndefined()); ensure_equals("got error", errordata.asString(), "badness"); } + void coroPumpsNoLog() + { + BEGIN + { + LLCoroEventPumps waiter; + replyName = waiter.getName0(); + errorName = waiter.getName1(); + result = waiter.waitWithLog(); + } + END + } + template<> template<> void object::test<11>() { + clear(); set_test_name("coroPumpsNoLog"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPumpsNoLog, this, _1)); - coro(std::nothrow); + LLCoros::instance().launch("test<11>", coroPumpsNoLog); debug("about to send"); LLEventPumps::instance().obtain(replyName).post("received"); debug("back from send"); - ensure_done(coro); ensure_equals(result.asString(), "received"); } + void coroPumpsLog() + { + BEGIN + { + LLCoroEventPumps waiter; + replyName = waiter.getName0(); + errorName = waiter.getName1(); + WrapLLErrs capture; + try + { + result = waiter.waitWithLog(); + debug("no exception"); + } + catch (const WrapLLErrs::FatalException& e) + { + debug(STRINGIZE("exception " << e.what())); + threw = e.what(); + } + } + END + } + template<> template<> void object::test<12>() { + clear(); set_test_name("coroPumpsLog"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPumpsLog, this, _1)); - coro(std::nothrow); + LLCoros::instance().launch("test<12>", coroPumpsLog); debug("about to send"); LLEventPumps::instance().obtain(errorName).post("badness"); debug("back from send"); - ensure_done(coro); ensure("no result", result.isUndefined()); ensure_contains("got error", threw, "badness"); } + void postAndWait1() + { + BEGIN + { + result = postAndWait(LLSDMap("value", 17), // request event + immediateAPI.getPump(), // requestPump + "reply1", // replyPump + "reply"); // request["reply"] = name + } + END + } + template<> template<> void object::test<13>() { + clear(); set_test_name("postAndWait1"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::postAndWait1, this, _1)); - coro(std::nothrow); - ensure_done(coro); + LLCoros::instance().launch("test<13>", postAndWait1); ensure_equals(result.asInteger(), 18); } + void postAndWait2() + { + BEGIN + { + LLEventWithID pair = ::postAndWait2(LLSDMap("value", 18), + immediateAPI.getPump(), + "reply2", + "error2", + "reply", + "error"); + result = pair.first; + which = pair.second; + debug(STRINGIZE("result = " << result << ", which = " << which)); + } + END + } + template<> template<> void object::test<14>() { + clear(); set_test_name("postAndWait2"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::postAndWait2, this, _1)); - coro(std::nothrow); - ensure_done(coro); + LLCoros::instance().launch("test<14>", postAndWait2); ensure_equals(result.asInteger(), 19); ensure_equals(which, 0); } + void postAndWait2_1() + { + BEGIN + { + LLEventWithID pair = ::postAndWait2(LLSDMap("value", 18)("fail", LLSD()), + immediateAPI.getPump(), + "reply2", + "error2", + "reply", + "error"); + result = pair.first; + which = pair.second; + debug(STRINGIZE("result = " << result << ", which = " << which)); + } + END + } + template<> template<> void object::test<15>() { + clear(); set_test_name("postAndWait2_1"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::postAndWait2_1, this, _1)); - coro(std::nothrow); - ensure_done(coro); + LLCoros::instance().launch("test<15>", postAndWait2_1); ensure_equals(result.asInteger(), 19); ensure_equals(which, 1); } + void coroPumpPost() + { + BEGIN + { + LLCoroEventPump waiter; + result = waiter.postAndWait(LLSDMap("value", 17), + immediateAPI.getPump(), "reply"); + } + END + } + template<> template<> void object::test<16>() { + clear(); set_test_name("coroPumpPost"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPumpPost, this, _1)); - coro(std::nothrow); - ensure_done(coro); + LLCoros::instance().launch("test<16>", coroPumpPost); ensure_equals(result.asInteger(), 18); } + void coroPumpsPost() + { + BEGIN + { + LLCoroEventPumps waiter; + LLEventWithID pair(waiter.postAndWait(LLSDMap("value", 23), + immediateAPI.getPump(), "reply", "error")); + result = pair.first; + which = pair.second; + } + END + } + template<> template<> void object::test<17>() { + clear(); set_test_name("coroPumpsPost reply"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPumpsPost, this, _1)); - coro(std::nothrow); - ensure_done(coro); + LLCoros::instance().launch("test<17>", coroPumpsPost); ensure_equals(result.asInteger(), 24); ensure_equals("which pump", which, 0); } + void coroPumpsPost_1() + { + BEGIN + { + LLCoroEventPumps waiter; + LLEventWithID pair( + waiter.postAndWait(LLSDMap("value", 23)("fail", LLSD()), + immediateAPI.getPump(), "reply", "error")); + result = pair.first; + which = pair.second; + } + END + } + template<> template<> void object::test<18>() { + clear(); set_test_name("coroPumpsPost error"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPumpsPost_1, this, _1)); - coro(std::nothrow); - ensure_done(coro); + LLCoros::instance().launch("test<18>", coroPumpsPost_1); ensure_equals(result.asInteger(), 24); ensure_equals("which pump", which, 1); } + void coroPumpsPostNoEx() + { + BEGIN + { + LLCoroEventPumps waiter; + result = waiter.postAndWaitWithException(LLSDMap("value", 8), + immediateAPI.getPump(), "reply", "error"); + } + END + } + template<> template<> void object::test<19>() { + clear(); set_test_name("coroPumpsPostNoEx"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPumpsPostNoEx, this, _1)); - coro(std::nothrow); - ensure_done(coro); + LLCoros::instance().launch("test<19>", coroPumpsPostNoEx); ensure_equals(result.asInteger(), 9); } + void coroPumpsPostEx() + { + BEGIN + { + LLCoroEventPumps waiter; + try + { + result = waiter.postAndWaitWithException( + LLSDMap("value", 9)("fail", LLSD()), + immediateAPI.getPump(), "reply", "error"); + debug("no exception"); + } + catch (const LLErrorEvent& e) + { + debug(STRINGIZE("exception " << e.what())); + errordata = e.getData(); + } + } + END + } + template<> template<> void object::test<20>() { + clear(); set_test_name("coroPumpsPostEx"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPumpsPostEx, this, _1)); - coro(std::nothrow); - ensure_done(coro); + LLCoros::instance().launch("test<20>", coroPumpsPostEx); ensure("no result", result.isUndefined()); ensure_equals("got error", errordata.asInteger(), 10); } + void coroPumpsPostNoLog() + { + BEGIN + { + LLCoroEventPumps waiter; + result = waiter.postAndWaitWithLog(LLSDMap("value", 30), + immediateAPI.getPump(), "reply", "error"); + } + END + } + template<> template<> void object::test<21>() { + clear(); set_test_name("coroPumpsPostNoLog"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPumpsPostNoLog, this, _1)); - coro(std::nothrow); - ensure_done(coro); + LLCoros::instance().launch("test<21>", coroPumpsPostNoLog); ensure_equals(result.asInteger(), 31); } + void coroPumpsPostLog() + { + BEGIN + { + LLCoroEventPumps waiter; + WrapLLErrs capture; + try + { + result = waiter.postAndWaitWithLog( + LLSDMap("value", 31)("fail", LLSD()), + immediateAPI.getPump(), "reply", "error"); + debug("no exception"); + } + catch (const WrapLLErrs::FatalException& e) + { + debug(STRINGIZE("exception " << e.what())); + threw = e.what(); + } + } + END + } + template<> template<> void object::test<22>() { + clear(); set_test_name("coroPumpsPostLog"); DEBUG; - coroutine_type coro(boost::bind(&coroutine_data::coroPumpsPostLog, this, _1)); - coro(std::nothrow); - ensure_done(coro); + LLCoros::instance().launch("test<22>", coroPumpsPostLog); ensure("no result", result.isUndefined()); ensure_contains("got error", threw, "32"); } diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index a0b1ea13b1..9631e960c5 100755 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -134,9 +134,13 @@ if (LL_TESTS) ${BOOST_THREAD_LIBRARY} ) + # If http_proxy is in the current environment (e.g. to fetch s3-proxy + # autobuild packages), suppress it for this integration test: it screws up + # the tests. LL_ADD_INTEGRATION_TEST(llcorehttp "${llcorehttp_TEST_SOURCE_FILES}" "${test_libs}" + "-Dhttp_proxy" ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llcorehttp_peer.py" ) diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 10953408db..fc51d147a6 100755 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -256,8 +256,8 @@ if (LL_TESTS) ${LLMESSAGE_LIBRARIES} ${LLCOREHTTP_LIBRARIES} ${JSONCPP_LIBRARIES} - ${BOOST_CONTEXT_LIBRARY} ${BOOST_COROUTINE_LIBRARY} + ${BOOST_CONTEXT_LIBRARY} ${GOOGLEMOCK_LIBRARIES} ) diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 7014048021..d262862c80 100755 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -137,8 +137,8 @@ namespace LLAvatarNameCache bool expirationFromCacheControl(const LLSD& headers, F64 *expires); - // This is a coroutine. The only parameter that can be specified as a reference is the self - void requestAvatarNameCache_(LLCoros::self& self, std::string url, std::vector<LLUUID> agentIds); + // This is a coroutine. + void requestAvatarNameCache_(std::string url, std::vector<LLUUID> agentIds); void handleAvNameCacheSuccess(const LLSD &data, const LLSD &httpResult); } @@ -185,9 +185,9 @@ namespace LLAvatarNameCache // Coroutine for sending and processing avatar name cache requests. // Do not call directly. See documentation in lleventcoro.h and llcoro.h for // further explanation. -void LLAvatarNameCache::requestAvatarNameCache_(LLCoros::self& self, std::string url, std::vector<LLUUID> agentIds) +void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector<LLUUID> agentIds) { - LL_DEBUGS("AvNameCache") << "Entering coroutine " << LLCoros::instance().getName(self) + LL_DEBUGS("AvNameCache") << "Entering coroutine " << LLCoros::instance().getName() << " with url '" << url << "', requesting " << agentIds.size() << " Agent Ids" << LL_ENDL; try @@ -195,7 +195,7 @@ void LLAvatarNameCache::requestAvatarNameCache_(LLCoros::self& self, std::string bool success = true; LLCoreHttpUtil::HttpCoroutineAdapter httpAdapter("NameCache", LLAvatarNameCache::sHttpPolicy); - LLSD results = httpAdapter.getAndYield(self, sHttpRequest, url); + LLSD results = httpAdapter.getAndYield(sHttpRequest, url); LLSD httpResults; LL_DEBUGS() << results << LL_ENDL; @@ -401,7 +401,7 @@ void LLAvatarNameCache::requestNamesViaCapability() std::string coroname = LLCoros::instance().launch("LLAvatarNameCache::requestAvatarNameCache_", - boost::bind(&LLAvatarNameCache::requestAvatarNameCache_, _1, url, agent_ids)); + boost::bind(&LLAvatarNameCache::requestAvatarNameCache_, url, agent_ids)); LL_DEBUGS("AvNameCache") << coroname << " with url '" << url << "', agent_ids.size()=" << agent_ids.size() << LL_ENDL; } diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index a2004db30a..05d74a45a2 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -565,17 +565,17 @@ HttpCoroutineAdapter::~HttpCoroutineAdapter() cancelYieldingOperation(); } -LLSD HttpCoroutineAdapter::postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::postAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroLLSDHandler(replyPump)); - return postAndYield_(self, request, url, body, options, headers, httpHandler); + return postAndYield_(request, url, body, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::postAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, +LLSD HttpCoroutineAdapter::postAndYield_(LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler) @@ -596,35 +596,35 @@ LLSD HttpCoroutineAdapter::postAndYield_(LLCoros::self & self, LLCore::HttpReque } saveState(hhandle, request, handler); - LLSD results = waitForEventOn(self, handler->getReplyPump()); + LLSD results = waitForEventOn(handler->getReplyPump()); cleanState(); return results; } -LLSD HttpCoroutineAdapter::postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::postAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::BufferArray::ptr_t rawbody, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroLLSDHandler(replyPump)); - return postAndYield_(self, request, url, rawbody, options, headers, httpHandler); + return postAndYield_(request, url, rawbody, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::postRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::postRawAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::BufferArray::ptr_t rawbody, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroRawHandler(replyPump)); - return postAndYield_(self, request, url, rawbody, options, headers, httpHandler); + return postAndYield_(request, url, rawbody, options, headers, httpHandler); } // *TODO: This functionality could be moved into the LLCore::Http library itself // by having the CURL layer read the file directly. -LLSD HttpCoroutineAdapter::postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::postFileAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, std::string fileName, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { @@ -648,12 +648,12 @@ LLSD HttpCoroutineAdapter::postFileAndYield(LLCoros::self & self, LLCore::HttpRe } } - return postAndYield(self, request, url, fileData, options, headers); + return postAndYield(request, url, fileData, options, headers); } // *TODO: This functionality could be moved into the LLCore::Http library itself // by having the CURL layer read the file directly. -LLSD HttpCoroutineAdapter::postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::postFileAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLUUID assetId, LLAssetType::EType assetType, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { @@ -673,11 +673,11 @@ LLSD HttpCoroutineAdapter::postFileAndYield(LLCoros::self & self, LLCore::HttpRe delete[] fileBuffer; } - return postAndYield(self, request, url, fileData, options, headers); + return postAndYield(request, url, fileData, options, headers); } -LLSD HttpCoroutineAdapter::postAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, +LLSD HttpCoroutineAdapter::postAndYield_(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::BufferArray::ptr_t &rawbody, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler) @@ -697,24 +697,24 @@ LLSD HttpCoroutineAdapter::postAndYield_(LLCoros::self & self, LLCore::HttpReque } saveState(hhandle, request, handler); - LLSD results = waitForEventOn(self, handler->getReplyPump()); + LLSD results = waitForEventOn(handler->getReplyPump()); cleanState(); //LL_INFOS() << "Results for transaction " << transactionId << LL_ENDL; return results; } -LLSD HttpCoroutineAdapter::putAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::putAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroLLSDHandler(replyPump)); - return putAndYield_(self, request, url, body, options, headers, httpHandler); + return putAndYield_(request, url, body, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::putAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, +LLSD HttpCoroutineAdapter::putAndYield_(LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler) @@ -735,43 +735,43 @@ LLSD HttpCoroutineAdapter::putAndYield_(LLCoros::self & self, LLCore::HttpReques } saveState(hhandle, request, handler); - LLSD results = waitForEventOn(self, handler->getReplyPump()); + LLSD results = waitForEventOn(handler->getReplyPump()); cleanState(); //LL_INFOS() << "Results for transaction " << transactionId << LL_ENDL; return results; } -LLSD HttpCoroutineAdapter::getAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::getAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroLLSDHandler(replyPump)); - return getAndYield_(self, request, url, options, headers, httpHandler); + return getAndYield_(request, url, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::getRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::getRawAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroRawHandler(replyPump)); - return getAndYield_(self, request, url, options, headers, httpHandler); + return getAndYield_(request, url, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::getJsonAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::getJsonAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroJSONHandler(replyPump)); - return getAndYield_(self, request, url, options, headers, httpHandler); + return getAndYield_(request, url, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::getAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, +LLSD HttpCoroutineAdapter::getAndYield_(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler) @@ -790,24 +790,24 @@ LLSD HttpCoroutineAdapter::getAndYield_(LLCoros::self & self, LLCore::HttpReques } saveState(hhandle, request, handler); - LLSD results = waitForEventOn(self, handler->getReplyPump()); + LLSD results = waitForEventOn(handler->getReplyPump()); cleanState(); //LL_INFOS() << "Results for transaction " << transactionId << LL_ENDL; return results; } -LLSD HttpCoroutineAdapter::deleteAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::deleteAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroLLSDHandler(replyPump)); - return deleteAndYield_(self, request, url, options, headers, httpHandler); + return deleteAndYield_(request, url, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::deleteAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, +LLSD HttpCoroutineAdapter::deleteAndYield_(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler) { @@ -825,7 +825,7 @@ LLSD HttpCoroutineAdapter::deleteAndYield_(LLCoros::self & self, LLCore::HttpReq } saveState(hhandle, request, handler); - LLSD results = waitForEventOn(self, handler->getReplyPump()); + LLSD results = waitForEventOn(handler->getReplyPump()); cleanState(); //LL_INFOS() << "Results for transaction " << transactionId << LL_ENDL; return results; @@ -907,7 +907,7 @@ LLCore::HttpStatus HttpCoroutineAdapter::getStatusFromLLSD(const LLSD &httpResul void HttpCoroutineAdapter::callbackHttpGet(const std::string &url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure) { LLCoros::instance().launch("HttpCoroutineAdapter::genericGetCoro", - boost::bind(&HttpCoroutineAdapter::trivialGetCoro, _1, url, policyId, success, failure)); + boost::bind(&HttpCoroutineAdapter::trivialGetCoro, url, policyId, success, failure)); } /*static*/ @@ -921,7 +921,7 @@ void HttpCoroutineAdapter::messageHttpGet(const std::string &url, const std::str } /*static*/ -void HttpCoroutineAdapter::trivialGetCoro(LLCoros::self& self, std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure) +void HttpCoroutineAdapter::trivialGetCoro(std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure) { LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericGetCoro", policyId)); @@ -932,7 +932,7 @@ void HttpCoroutineAdapter::trivialGetCoro(LLCoros::self& self, std::string url, LL_INFOS("HttpCoroutineAdapter", "genericGetCoro") << "Generic GET for " << url << LL_ENDL; - LLSD result = httpAdapter->getAndYield(self, httpRequest, url, httpOpts); + LLSD result = httpAdapter->getAndYield(httpRequest, url, httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -957,7 +957,7 @@ void HttpCoroutineAdapter::trivialGetCoro(LLCoros::self& self, std::string url, void HttpCoroutineAdapter::callbackHttpPost(const std::string &url, LLCore::HttpRequest::policy_t policyId, const LLSD &postData, completionCallback_t success, completionCallback_t failure) { LLCoros::instance().launch("HttpCoroutineAdapter::genericPostCoro", - boost::bind(&HttpCoroutineAdapter::trivialPostCoro, _1, url, policyId, postData, success, failure)); + boost::bind(&HttpCoroutineAdapter::trivialPostCoro, url, policyId, postData, success, failure)); } /*static*/ @@ -972,7 +972,7 @@ void HttpCoroutineAdapter::messageHttpPost(const std::string &url, const LLSD &p } /*static*/ -void HttpCoroutineAdapter::trivialPostCoro(LLCoros::self& self, std::string url, LLCore::HttpRequest::policy_t policyId, LLSD postData, completionCallback_t success, completionCallback_t failure) +void HttpCoroutineAdapter::trivialPostCoro(std::string url, LLCore::HttpRequest::policy_t policyId, LLSD postData, completionCallback_t success, completionCallback_t failure) { LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", policyId)); @@ -983,7 +983,7 @@ void HttpCoroutineAdapter::trivialPostCoro(LLCoros::self& self, std::string url, LL_INFOS("HttpCoroutineAdapter", "genericPostCoro") << "Generic POST for " << url << LL_ENDL; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, postData, httpOpts); + LLSD result = httpAdapter->postAndYield(httpRequest, url, postData, httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); diff --git a/indra/llmessage/llcorehttputil.h b/indra/llmessage/llcorehttputil.h index 6d8f333c72..999fd5f90b 100644 --- a/indra/llmessage/llcorehttputil.h +++ b/indra/llmessage/llcorehttputil.h @@ -329,67 +329,67 @@ public: /// /// @Note: the request's smart pointer is passed by value so that it will /// not be deallocated during the yield. - LLSD postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + LLSD postAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + LLSD postAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::BufferArray::ptr_t rawbody, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, + LLSD postAndYield(LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpHeaders::ptr_t &headers) { - return postAndYield(self, request, url, body, + return postAndYield(request, url, body, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } - LLSD postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, + LLSD postAndYield(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::BufferArray::ptr_t &rawbody, LLCore::HttpHeaders::ptr_t &headers) { - return postAndYield(self, request, url, rawbody, + return postAndYield(request, url, rawbody, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } - LLSD postRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + LLSD postRawAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::BufferArray::ptr_t rawbody, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD postRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, + LLSD postRawAndYield(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::BufferArray::ptr_t &rawbody, LLCore::HttpHeaders::ptr_t &headers) { - return postRawAndYield(self, request, url, rawbody, + return postRawAndYield(request, url, rawbody, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } - LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + LLSD postFileAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, std::string fileName, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, + LLSD postFileAndYield(LLCore::HttpRequest::ptr_t &request, const std::string & url, std::string fileName, LLCore::HttpHeaders::ptr_t &headers) { - return postFileAndYield(self, request, url, fileName, + return postFileAndYield(request, url, fileName, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } - LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + LLSD postFileAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLUUID assetId, LLAssetType::EType assetType, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + LLSD postFileAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLUUID assetId, LLAssetType::EType assetType, LLCore::HttpHeaders::ptr_t &headers) { - return postFileAndYield(self, request, url, assetId, assetType, + return postFileAndYield(request, url, assetId, assetType, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } @@ -399,7 +399,7 @@ public: /// /// @Note: the request's smart pointer is passed by value so that it will /// not be deallocated during the yield. - LLSD putAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + LLSD putAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); @@ -409,38 +409,38 @@ public: /// /// @Note: the request's smart pointer is passed by value so that it will /// not be deallocated during the yield. - LLSD getAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + LLSD getAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD getAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, + LLSD getAndYield(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpHeaders::ptr_t &headers) { - return getAndYield(self, request, url, + return getAndYield(request, url, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } - LLSD getRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + LLSD getRawAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD getRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, + LLSD getRawAndYield(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpHeaders::ptr_t &headers) { - return getRawAndYield(self, request, url, + return getRawAndYield(request, url, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } - LLSD getJsonAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + LLSD getJsonAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD getJsonndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, + LLSD getJsonndYield(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpHeaders::ptr_t &headers) { - return getJsonAndYield(self, request, url, + return getJsonAndYield(request, url, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } @@ -451,7 +451,7 @@ public: /// /// @Note: the request's smart pointer is passed by value so that it will /// not be deallocated during the yield. - LLSD deleteAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + LLSD deleteAndYield(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); @@ -495,31 +495,31 @@ private: HttpCoroHandler::ptr_t &handler); void cleanState(); - LLSD postAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, + LLSD postAndYield_(LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler); - LLSD postAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, + LLSD postAndYield_(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::BufferArray::ptr_t &rawbody, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler); - LLSD putAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, + LLSD putAndYield_(LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler); - LLSD getAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, + LLSD getAndYield_(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler); - LLSD deleteAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, + LLSD deleteAndYield_(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler); - static void trivialGetCoro(LLCoros::self& self, std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure); - static void trivialPostCoro(LLCoros::self& self, std::string url, LLCore::HttpRequest::policy_t policyId, LLSD postData, completionCallback_t success, completionCallback_t failure); + static void trivialGetCoro(std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure); + static void trivialPostCoro(std::string url, LLCore::HttpRequest::policy_t policyId, LLSD postData, completionCallback_t success, completionCallback_t failure); void checkDefaultHeaders(LLCore::HttpHeaders::ptr_t &headers); diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp index f928c84ecb..cd9146ea16 100755 --- a/indra/newview/llaccountingcostmanager.cpp +++ b/indra/newview/llaccountingcostmanager.cpp @@ -45,10 +45,10 @@ LLAccountingCostManager::LLAccountingCostManager(): // Coroutine for sending and processing avatar name cache requests. // Do not call directly. See documentation in lleventcoro.h and llcoro.h for // further explanation. -void LLAccountingCostManager::accountingCostCoro(LLCoros::self& self, std::string url, +void LLAccountingCostManager::accountingCostCoro(std::string url, eSelectionType selectionType, const LLHandle<LLAccountingCostObserver> observerHandle) { - LL_DEBUGS("LLAccountingCostManager") << "Entering coroutine " << LLCoros::instance().getName(self) + LL_DEBUGS("LLAccountingCostManager") << "Entering coroutine " << LLCoros::instance().getName() << " with url '" << url << LL_ENDL; try @@ -101,7 +101,7 @@ void LLAccountingCostManager::accountingCostCoro(LLCoros::self& self, std::strin LLCoreHttpUtil::HttpCoroutineAdapter httpAdapter("AccountingCost", mHttpPolicy); - LLSD results = httpAdapter.postAndYield(self, mHttpRequest, url, dataToPost); + LLSD results = httpAdapter.postAndYield(mHttpRequest, url, dataToPost); LLSD httpResults; httpResults = results["http_result"]; @@ -181,7 +181,7 @@ void LLAccountingCostManager::fetchCosts( eSelectionType selectionType, { std::string coroname = LLCoros::instance().launch("LLAccountingCostManager::accountingCostCoro", - boost::bind(&LLAccountingCostManager::accountingCostCoro, this, _1, url, selectionType, observer_handle)); + boost::bind(&LLAccountingCostManager::accountingCostCoro, this, url, selectionType, observer_handle)); LL_DEBUGS() << coroname << " with url '" << url << LL_ENDL; } diff --git a/indra/newview/llaccountingcostmanager.h b/indra/newview/llaccountingcostmanager.h index 34748894e3..d5a94f6fda 100755 --- a/indra/newview/llaccountingcostmanager.h +++ b/indra/newview/llaccountingcostmanager.h @@ -77,7 +77,7 @@ private: std::set<LLUUID> mPendingObjectQuota; typedef std::set<LLUUID>::iterator IDIt; - void accountingCostCoro(LLCoros::self& self, std::string url, eSelectionType selectionType, const LLHandle<LLAccountingCostObserver> observerHandle); + void accountingCostCoro(std::string url, eSelectionType selectionType, const LLHandle<LLAccountingCostObserver> observerHandle); LLCore::HttpRequest::ptr_t mHttpRequest; LLCore::HttpRequest::policy_t mHttpPolicy; diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index 73b2ecfd36..e260142254 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -60,14 +60,14 @@ LLFrameTimer LLAvatarRenderInfoAccountant::sRenderInfoReportTimer; //LLCore::HttpRequest::ptr_t LLAvatarRenderInfoAccountant::sHttpRequest; //========================================================================= -void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(LLCoros::self& self, std::string url, U64 regionHandle) +void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(std::string url, U64 regionHandle) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy)); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLSD result = httpAdapter->getAndYield(self, httpRequest, url); + LLSD result = httpAdapter->getAndYield(httpRequest, url); LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle); if (!regionp) @@ -130,7 +130,7 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(LLCoros::self& self, } //------------------------------------------------------------------------- -void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(LLCoros::self& self, std::string url, U64 regionHandle) +void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U64 regionHandle) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -190,7 +190,7 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(LLCoros::self& sel report[KEY_AGENTS] = agents; regionp = NULL; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, report); + LLSD result = httpAdapter->postAndYield(httpRequest, url, report); regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle); if (!regionp) @@ -239,7 +239,7 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio { std::string coroname = LLCoros::instance().launch("LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro", - boost::bind(&LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro, _1, url, regionp->getHandle())); + boost::bind(&LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro, url, regionp->getHandle())); } } @@ -264,7 +264,7 @@ void LLAvatarRenderInfoAccountant::getRenderInfoFromRegion(LLViewerRegion * regi // First send a request to get the latest data std::string coroname = LLCoros::instance().launch("LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro", - boost::bind(&LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro, _1, url, regionp->getHandle())); + boost::bind(&LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro, url, regionp->getHandle())); } } diff --git a/indra/newview/llavatarrenderinfoaccountant.h b/indra/newview/llavatarrenderinfoaccountant.h index 1736f03772..f7a04cca2c 100644 --- a/indra/newview/llavatarrenderinfoaccountant.h +++ b/indra/newview/llavatarrenderinfoaccountant.h @@ -56,8 +56,8 @@ private: // Send data updates about once per minute, only need per-frame resolution static LLFrameTimer sRenderInfoReportTimer; - static void avatarRenderInfoGetCoro(LLCoros::self& self, std::string url, U64 regionHandle); - static void avatarRenderInfoReportCoro(LLCoros::self& self, std::string url, U64 regionHandle); + static void avatarRenderInfoGetCoro(std::string url, U64 regionHandle); + static void avatarRenderInfoReportCoro(std::string url, U64 regionHandle); }; diff --git a/indra/newview/llcoproceduremanager.cpp b/indra/newview/llcoproceduremanager.cpp index 3ecb323cab..1a4a906f35 100644 --- a/indra/newview/llcoproceduremanager.cpp +++ b/indra/newview/llcoproceduremanager.cpp @@ -54,7 +54,7 @@ LLCoprocedureManager::LLCoprocedureManager(): new LLCoreHttpUtil::HttpCoroutineAdapter("uploadPostAdapter", mHTTPPolicy)); std::string uploadCoro = LLCoros::instance().launch("LLCoprocedureManager::coprocedureInvokerCoro", - boost::bind(&LLCoprocedureManager::coprocedureInvokerCoro, this, _1, httpAdapter)); + boost::bind(&LLCoprocedureManager::coprocedureInvokerCoro, this, httpAdapter)); mCoroMapping.insert(CoroAdapterMap_t::value_type(uploadCoro, httpAdapter)); } @@ -132,13 +132,13 @@ void LLCoprocedureManager::cancelCoprocedure(const LLUUID &id) } //========================================================================= -void LLCoprocedureManager::coprocedureInvokerCoro(LLCoros::self& self, LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter) +void LLCoprocedureManager::coprocedureInvokerCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter) { LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); while (!mShutdown) { - waitForEventOn(self, mWakeupTrigger); + waitForEventOn(mWakeupTrigger); if (mShutdown) break; @@ -152,7 +152,7 @@ void LLCoprocedureManager::coprocedureInvokerCoro(LLCoros::self& self, LLCoreHtt try { - coproc->mProc(self, httpAdapter, coproc->mId); + coproc->mProc(httpAdapter, coproc->mId); } catch (std::exception &e) { diff --git a/indra/newview/llcoproceduremanager.h b/indra/newview/llcoproceduremanager.h index 4e971d42e3..6ba3891e87 100644 --- a/indra/newview/llcoproceduremanager.h +++ b/indra/newview/llcoproceduremanager.h @@ -36,7 +36,7 @@ class LLCoprocedureManager : public LLSingleton < LLCoprocedureManager > { public: - typedef boost::function<void(LLCoros::self &, LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, const LLUUID &id)> CoProcedure_t; + typedef boost::function<void(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, const LLUUID &id)> CoProcedure_t; LLCoprocedureManager(); virtual ~LLCoprocedureManager(); @@ -111,7 +111,7 @@ private: CoroAdapterMap_t mCoroMapping; - void coprocedureInvokerCoro(LLCoros::self& self, LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter); + void coprocedureInvokerCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter); }; #endif diff --git a/indra/newview/llestateinfomodel.cpp b/indra/newview/llestateinfomodel.cpp index 04d0dda7ac..884d1579e6 100755 --- a/indra/newview/llestateinfomodel.cpp +++ b/indra/newview/llestateinfomodel.cpp @@ -123,12 +123,12 @@ bool LLEstateInfoModel::commitEstateInfoCaps() } LLCoros::instance().launch("LLEstateInfoModel::commitEstateInfoCapsCoro", - boost::bind(&LLEstateInfoModel::commitEstateInfoCapsCoro, this, _1, url)); + boost::bind(&LLEstateInfoModel::commitEstateInfoCapsCoro, this, url)); return true; } -void LLEstateInfoModel::commitEstateInfoCapsCoro(LLCoros::self& self, std::string url) +void LLEstateInfoModel::commitEstateInfoCapsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -153,7 +153,7 @@ void LLEstateInfoModel::commitEstateInfoCapsCoro(LLCoros::self& self, std::strin << ", sun_hour = " << getSunHour() << LL_ENDL; LL_DEBUGS() << body << LL_ENDL; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, body); + LLSD result = httpAdapter->postAndYield(httpRequest, url, body); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); diff --git a/indra/newview/llestateinfomodel.h b/indra/newview/llestateinfomodel.h index 2deae7e322..fcfbd1ce7d 100755 --- a/indra/newview/llestateinfomodel.h +++ b/indra/newview/llestateinfomodel.h @@ -101,7 +101,7 @@ private: update_signal_t mUpdateSignal; /// emitted when we receive update from sim update_signal_t mCommitSignal; /// emitted when our update gets applied to sim - void commitEstateInfoCapsCoro(LLCoros::self& self, std::string url); + void commitEstateInfoCapsCoro(std::string url); }; inline bool LLEstateInfoModel::getFlag(U64 flag) const diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 03a380f2f6..54da226209 100755 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -61,7 +61,7 @@ namespace Details static const F32 EVENT_POLL_ERROR_RETRY_SECONDS_INC; static const S32 MAX_EVENT_POLL_HTTP_ERRORS; - void eventPollCoro(LLCoros::self& self, std::string url); + void eventPollCoro(std::string url); void handleMessage(const LLSD &content); @@ -113,7 +113,7 @@ namespace Details { std::string coroname = LLCoros::instance().launch("LLEventPollImpl::eventPollCoro", - boost::bind(&LLEventPollImpl::eventPollCoro, this, _1, url)); + boost::bind(&LLEventPollImpl::eventPollCoro, this, url)); LL_INFOS("LLEventPollImpl") << coroname << " with url '" << url << LL_ENDL; } } @@ -131,7 +131,7 @@ namespace Details } } - void LLEventPollImpl::eventPollCoro(LLCoros::self& self, std::string url) + void LLEventPollImpl::eventPollCoro(std::string url) { LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EventPoller", mHttpPolicy)); LLSD acknowledge; @@ -154,7 +154,7 @@ namespace Details // << LLSDXMLStreamer(request) << LL_ENDL; LL_DEBUGS("LLEventPollImpl") << " <" << counter << "> posting and yielding." << LL_ENDL; - LLSD result = httpAdapter->postAndYield(self, mHttpRequest, url, request); + LLSD result = httpAdapter->postAndYield(mHttpRequest, url, request); // LL_DEBUGS("LLEventPollImpl::eventPollCoro") << "<" << counter << "> result = " // << LLSDXMLStreamer(result) << LL_ENDL; @@ -197,7 +197,7 @@ namespace Details " seconds, error count is now " << errorCount << LL_ENDL; timeout.eventAfter(waitToRetry, LLSD()); - waitForEventOn(self, timeout); + waitForEventOn(timeout); if (mDone) break; diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index 87d7aacda1..136e02953c 100755 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -144,7 +144,7 @@ LLFacebookConnectHandler gFacebookConnectHandler; /////////////////////////////////////////////////////////////////////////////// // -void LLFacebookConnect::facebookConnectCoro(LLCoros::self& self, std::string authCode, std::string authState) +void LLFacebookConnect::facebookConnectCoro(std::string authCode, std::string authState) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -167,7 +167,7 @@ void LLFacebookConnect::facebookConnectCoro(LLCoros::self& self, std::string aut setConnectionState(LLFacebookConnect::FB_CONNECTION_IN_PROGRESS); - LLSD result = httpAdapter->putAndYield(self, httpRequest, getFacebookConnectURL("/connection"), putData, httpOpts, get_headers()); + LLSD result = httpAdapter->putAndYield(httpRequest, getFacebookConnectURL("/connection"), putData, httpOpts, get_headers()); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -231,7 +231,7 @@ bool LLFacebookConnect::testShareStatus(LLSD &result) return false; } -void LLFacebookConnect::facebookShareCoro(LLCoros::self& self, std::string route, LLSD share) +void LLFacebookConnect::facebookShareCoro(std::string route, LLSD share) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -244,7 +244,7 @@ void LLFacebookConnect::facebookShareCoro(LLCoros::self& self, std::string route setConnectionState(LLFacebookConnect::FB_POSTING); - LLSD result = httpAdapter->postAndYield(self, httpRequest, getFacebookConnectURL(route, true), share, httpOpts, get_headers()); + LLSD result = httpAdapter->postAndYield(httpRequest, getFacebookConnectURL(route, true), share, httpOpts, get_headers()); if (testShareStatus(result)) { @@ -254,7 +254,7 @@ void LLFacebookConnect::facebookShareCoro(LLCoros::self& self, std::string route } } -void LLFacebookConnect::facebookShareImageCoro(LLCoros::self& self, std::string route, LLPointer<LLImageFormatted> image, std::string caption) +void LLFacebookConnect::facebookShareImageCoro(std::string route, LLPointer<LLImageFormatted> image, std::string caption) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -311,7 +311,7 @@ void LLFacebookConnect::facebookShareImageCoro(LLCoros::self& self, std::string setConnectionState(LLFacebookConnect::FB_POSTING); - LLSD result = httpAdapter->postAndYield(self, httpRequest, getFacebookConnectURL(route, true), raw, httpOpts, httpHeaders); + LLSD result = httpAdapter->postAndYield(httpRequest, getFacebookConnectURL(route, true), raw, httpOpts, httpHeaders); if (testShareStatus(result)) { @@ -323,7 +323,7 @@ void LLFacebookConnect::facebookShareImageCoro(LLCoros::self& self, std::string /////////////////////////////////////////////////////////////////////////////// // -void LLFacebookConnect::facebookDisconnectCoro(LLCoros::self& self) +void LLFacebookConnect::facebookDisconnectCoro() { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -334,7 +334,7 @@ void LLFacebookConnect::facebookDisconnectCoro(LLCoros::self& self) setConnectionState(LLFacebookConnect::FB_DISCONNECTING); httpOpts->setFollowRedirects(false); - LLSD result = httpAdapter->deleteAndYield(self, httpRequest, getFacebookConnectURL("/connection"), httpOpts, get_headers()); + LLSD result = httpAdapter->deleteAndYield(httpRequest, getFacebookConnectURL("/connection"), httpOpts, get_headers()); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -358,7 +358,7 @@ void LLFacebookConnect::facebookDisconnectCoro(LLCoros::self& self) /////////////////////////////////////////////////////////////////////////////// // -void LLFacebookConnect::facebookConnectedCheckCoro(LLCoros::self& self, bool autoConnect) +void LLFacebookConnect::facebookConnectedCheckCoro(bool autoConnect) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -370,7 +370,7 @@ void LLFacebookConnect::facebookConnectedCheckCoro(LLCoros::self& self, bool aut httpOpts->setFollowRedirects(false); - LLSD result = httpAdapter->getAndYield(self, httpRequest, getFacebookConnectURL("/connection", true), httpOpts, get_headers()); + LLSD result = httpAdapter->getAndYield(httpRequest, getFacebookConnectURL("/connection", true), httpOpts, get_headers()); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -407,7 +407,7 @@ void LLFacebookConnect::facebookConnectedCheckCoro(LLCoros::self& self, bool aut /////////////////////////////////////////////////////////////////////////////// // -void LLFacebookConnect::facebookConnectInfoCoro(LLCoros::self& self) +void LLFacebookConnect::facebookConnectInfoCoro() { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -418,7 +418,7 @@ void LLFacebookConnect::facebookConnectInfoCoro(LLCoros::self& self) httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(false); - LLSD result = httpAdapter->getAndYield(self, httpRequest, getFacebookConnectURL("/info", true), httpOpts, get_headers()); + LLSD result = httpAdapter->getAndYield(httpRequest, getFacebookConnectURL("/info", true), httpOpts, get_headers()); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -451,7 +451,7 @@ void LLFacebookConnect::facebookConnectInfoCoro(LLCoros::self& self) /////////////////////////////////////////////////////////////////////////////// // -void LLFacebookConnect::facebookConnectFriendsCoro(LLCoros::self& self) +void LLFacebookConnect::facebookConnectFriendsCoro() { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -461,7 +461,7 @@ void LLFacebookConnect::facebookConnectFriendsCoro(LLCoros::self& self) httpOpts->setFollowRedirects(false); - LLSD result = httpAdapter->getAndYield(self, httpRequest, getFacebookConnectURL("/friends", true), httpOpts, get_headers()); + LLSD result = httpAdapter->getAndYield(httpRequest, getFacebookConnectURL("/friends", true), httpOpts, get_headers()); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -547,19 +547,19 @@ std::string LLFacebookConnect::getFacebookConnectURL(const std::string& route, b void LLFacebookConnect::connectToFacebook(const std::string& auth_code, const std::string& auth_state) { LLCoros::instance().launch("LLFacebookConnect::facebookConnectCoro", - boost::bind(&LLFacebookConnect::facebookConnectCoro, this, _1, auth_code, auth_state)); + boost::bind(&LLFacebookConnect::facebookConnectCoro, this, auth_code, auth_state)); } void LLFacebookConnect::disconnectFromFacebook() { LLCoros::instance().launch("LLFacebookConnect::facebookDisconnectCoro", - boost::bind(&LLFacebookConnect::facebookDisconnectCoro, this, _1)); + boost::bind(&LLFacebookConnect::facebookDisconnectCoro, this)); } void LLFacebookConnect::checkConnectionToFacebook(bool auto_connect) { LLCoros::instance().launch("LLFacebookConnect::facebookConnectedCheckCoro", - boost::bind(&LLFacebookConnect::facebookConnectedCheckCoro, this, _1, auto_connect)); + boost::bind(&LLFacebookConnect::facebookConnectedCheckCoro, this, auto_connect)); } void LLFacebookConnect::loadFacebookInfo() @@ -567,7 +567,7 @@ void LLFacebookConnect::loadFacebookInfo() if(mRefreshInfo) { LLCoros::instance().launch("LLFacebookConnect::facebookConnectInfoCoro", - boost::bind(&LLFacebookConnect::facebookConnectInfoCoro, this, _1)); + boost::bind(&LLFacebookConnect::facebookConnectInfoCoro, this)); } } @@ -576,7 +576,7 @@ void LLFacebookConnect::loadFacebookFriends() if(mRefreshContent) { LLCoros::instance().launch("LLFacebookConnect::facebookConnectFriendsCoro", - boost::bind(&LLFacebookConnect::facebookConnectFriendsCoro, this, _1)); + boost::bind(&LLFacebookConnect::facebookConnectFriendsCoro, this)); } } @@ -606,7 +606,7 @@ void LLFacebookConnect::postCheckin(const std::string& location, const std::stri } LLCoros::instance().launch("LLFacebookConnect::facebookShareCoro", - boost::bind(&LLFacebookConnect::facebookShareCoro, this, _1, "/share/checkin", body)); + boost::bind(&LLFacebookConnect::facebookShareCoro, this, "/share/checkin", body)); } void LLFacebookConnect::sharePhoto(const std::string& image_url, const std::string& caption) @@ -617,13 +617,13 @@ void LLFacebookConnect::sharePhoto(const std::string& image_url, const std::stri body["caption"] = caption; LLCoros::instance().launch("LLFacebookConnect::facebookShareCoro", - boost::bind(&LLFacebookConnect::facebookShareCoro, this, _1, "/share/photo", body)); + boost::bind(&LLFacebookConnect::facebookShareCoro, this, "/share/photo", body)); } void LLFacebookConnect::sharePhoto(LLPointer<LLImageFormatted> image, const std::string& caption) { LLCoros::instance().launch("LLFacebookConnect::facebookShareImageCoro", - boost::bind(&LLFacebookConnect::facebookShareImageCoro, this, _1, "/share/photo", image, caption)); + boost::bind(&LLFacebookConnect::facebookShareImageCoro, this, "/share/photo", image, caption)); } void LLFacebookConnect::updateStatus(const std::string& message) @@ -632,7 +632,7 @@ void LLFacebookConnect::updateStatus(const std::string& message) body["message"] = message; LLCoros::instance().launch("LLFacebookConnect::facebookShareCoro", - boost::bind(&LLFacebookConnect::facebookShareCoro, this, _1, "/share/wall", body)); + boost::bind(&LLFacebookConnect::facebookShareCoro, this, "/share/wall", body)); } void LLFacebookConnect::storeInfo(const LLSD& info) diff --git a/indra/newview/llfacebookconnect.h b/indra/newview/llfacebookconnect.h index f569c2f486..2a2cdb5499 100644 --- a/indra/newview/llfacebookconnect.h +++ b/indra/newview/llfacebookconnect.h @@ -105,13 +105,13 @@ private: static boost::scoped_ptr<LLEventPump> sContentWatcher; bool testShareStatus(LLSD &results); - void facebookConnectCoro(LLCoros::self& self, std::string authCode, std::string authState); - void facebookConnectedCheckCoro(LLCoros::self& self, bool autoConnect); - void facebookDisconnectCoro(LLCoros::self& self); - void facebookShareCoro(LLCoros::self& self, std::string route, LLSD share); - void facebookShareImageCoro(LLCoros::self& self, std::string route, LLPointer<LLImageFormatted> image, std::string caption); - void facebookConnectInfoCoro(LLCoros::self& self); - void facebookConnectFriendsCoro(LLCoros::self& self); + void facebookConnectCoro(std::string authCode, std::string authState); + void facebookConnectedCheckCoro(bool autoConnect); + void facebookDisconnectCoro(); + void facebookShareCoro(std::string route, LLSD share); + void facebookShareImageCoro(std::string route, LLPointer<LLImageFormatted> image, std::string caption); + void facebookConnectInfoCoro(); + void facebookConnectFriendsCoro(); }; #endif // LL_LLFACEBOOKCONNECT_H diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 9a714ac962..0b76ca16a9 100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -492,7 +492,7 @@ bool LLFeatureManager::loadGPUClass() return true; // indicates that a gpu value was established } -void LLFeatureManager::fetchFeatureTableCoro(LLCoros::self& self, std::string tableName) +void LLFeatureManager::fetchFeatureTableCoro(std::string tableName) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -526,7 +526,7 @@ void LLFeatureManager::fetchFeatureTableCoro(LLCoros::self& self, std::string ta LL_INFOS() << "LLFeatureManager fetching " << url << " into " << path << LL_ENDL; - LLSD result = httpAdapter->getRawAndYield(self, httpRequest, url); + LLSD result = httpAdapter->getRawAndYield(httpRequest, url); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -553,7 +553,7 @@ void LLFeatureManager::fetchFeatureTableCoro(LLCoros::self& self, std::string ta void LLFeatureManager::fetchHTTPTables() { LLCoros::instance().launch("LLFeatureManager::fetchFeatureTableCoro", - boost::bind(&LLFeatureManager::fetchFeatureTableCoro, this, _1, FEATURE_TABLE_VER_FILENAME)); + boost::bind(&LLFeatureManager::fetchFeatureTableCoro, this, FEATURE_TABLE_VER_FILENAME)); } void LLFeatureManager::cleanupFeatureTables() diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h index 1490c2122c..12ea691b49 100755 --- a/indra/newview/llfeaturemanager.h +++ b/indra/newview/llfeaturemanager.h @@ -166,7 +166,7 @@ protected: void initBaseMask(); - void fetchFeatureTableCoro(LLCoros::self& self, std::string name); + void fetchFeatureTableCoro(std::string name); std::map<std::string, LLFeatureList *> mMaskList; std::set<std::string> mSkippedFeatures; diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp index 873b1a7138..83e4f19191 100644 --- a/indra/newview/llflickrconnect.cpp +++ b/indra/newview/llflickrconnect.cpp @@ -67,7 +67,7 @@ void toast_user_for_flickr_success() /////////////////////////////////////////////////////////////////////////////// // -void LLFlickrConnect::flickrConnectCoro(LLCoros::self& self, std::string requestToken, std::string oauthVerifier) +void LLFlickrConnect::flickrConnectCoro(std::string requestToken, std::string oauthVerifier) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -86,7 +86,7 @@ void LLFlickrConnect::flickrConnectCoro(LLCoros::self& self, std::string request setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_IN_PROGRESS); - LLSD result = httpAdapter->putAndYield(self, httpRequest, getFlickrConnectURL("/connection"), body, httpOpts); + LLSD result = httpAdapter->putAndYield(httpRequest, getFlickrConnectURL("/connection"), body, httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -157,7 +157,7 @@ bool LLFlickrConnect::testShareStatus(LLSD &result) return false; } -void LLFlickrConnect::flickrShareCoro(LLCoros::self& self, LLSD share) +void LLFlickrConnect::flickrShareCoro(LLSD share) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -170,7 +170,7 @@ void LLFlickrConnect::flickrShareCoro(LLCoros::self& self, LLSD share) setConnectionState(LLFlickrConnect::FLICKR_POSTING); - LLSD result = httpAdapter->postAndYield(self, httpRequest, getFlickrConnectURL("/share/photo", true), share, httpOpts); + LLSD result = httpAdapter->postAndYield(httpRequest, getFlickrConnectURL("/share/photo", true), share, httpOpts); if (testShareStatus(result)) { @@ -181,7 +181,7 @@ void LLFlickrConnect::flickrShareCoro(LLCoros::self& self, LLSD share) } -void LLFlickrConnect::flickrShareImageCoro(LLCoros::self& self, LLPointer<LLImageFormatted> image, std::string title, std::string description, std::string tags, int safetyLevel) +void LLFlickrConnect::flickrShareImageCoro(LLPointer<LLImageFormatted> image, std::string title, std::string description, std::string tags, int safetyLevel) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -248,7 +248,7 @@ void LLFlickrConnect::flickrShareImageCoro(LLCoros::self& self, LLPointer<LLImag body << "\r\n--" << boundary << "--\r\n"; - LLSD result = httpAdapter->postAndYield(self, httpRequest, getFlickrConnectURL("/share/photo", true), raw, httpOpts, httpHeaders); + LLSD result = httpAdapter->postAndYield(httpRequest, getFlickrConnectURL("/share/photo", true), raw, httpOpts, httpHeaders); if (testShareStatus(result)) { @@ -260,7 +260,7 @@ void LLFlickrConnect::flickrShareImageCoro(LLCoros::self& self, LLPointer<LLImag /////////////////////////////////////////////////////////////////////////////// // -void LLFlickrConnect::flickrDisconnectCoro(LLCoros::self& self) +void LLFlickrConnect::flickrDisconnectCoro() { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -271,7 +271,7 @@ void LLFlickrConnect::flickrDisconnectCoro(LLCoros::self& self) setConnectionState(LLFlickrConnect::FLICKR_DISCONNECTING); httpOpts->setFollowRedirects(false); - LLSD result = httpAdapter->deleteAndYield(self, httpRequest, getFlickrConnectURL("/connection"), httpOpts); + LLSD result = httpAdapter->deleteAndYield(httpRequest, getFlickrConnectURL("/connection"), httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -294,7 +294,7 @@ void LLFlickrConnect::flickrDisconnectCoro(LLCoros::self& self) /////////////////////////////////////////////////////////////////////////////// // -void LLFlickrConnect::flickrConnectedCoro(LLCoros::self& self, bool autoConnect) +void LLFlickrConnect::flickrConnectedCoro(bool autoConnect) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -306,7 +306,7 @@ void LLFlickrConnect::flickrConnectedCoro(LLCoros::self& self, bool autoConnect) httpOpts->setFollowRedirects(false); - LLSD result = httpAdapter->getAndYield(self, httpRequest, getFlickrConnectURL("/connection", true), httpOpts); + LLSD result = httpAdapter->getAndYield(httpRequest, getFlickrConnectURL("/connection", true), httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -344,7 +344,7 @@ void LLFlickrConnect::flickrConnectedCoro(LLCoros::self& self, bool autoConnect) /////////////////////////////////////////////////////////////////////////////// // -void LLFlickrConnect::flickrInfoCoro(LLCoros::self& self) +void LLFlickrConnect::flickrInfoCoro() { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -355,7 +355,7 @@ void LLFlickrConnect::flickrInfoCoro(LLCoros::self& self) httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(false); - LLSD result = httpAdapter->getAndYield(self, httpRequest, getFlickrConnectURL("/info", true), httpOpts); + LLSD result = httpAdapter->getAndYield(httpRequest, getFlickrConnectURL("/info", true), httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -438,19 +438,19 @@ std::string LLFlickrConnect::getFlickrConnectURL(const std::string& route, bool void LLFlickrConnect::connectToFlickr(const std::string& request_token, const std::string& oauth_verifier) { LLCoros::instance().launch("LLFlickrConnect::flickrConnectCoro", - boost::bind(&LLFlickrConnect::flickrConnectCoro, this, _1, request_token, oauth_verifier)); + boost::bind(&LLFlickrConnect::flickrConnectCoro, this, request_token, oauth_verifier)); } void LLFlickrConnect::disconnectFromFlickr() { LLCoros::instance().launch("LLFlickrConnect::flickrDisconnectCoro", - boost::bind(&LLFlickrConnect::flickrDisconnectCoro, this, _1)); + boost::bind(&LLFlickrConnect::flickrDisconnectCoro, this)); } void LLFlickrConnect::checkConnectionToFlickr(bool auto_connect) { LLCoros::instance().launch("LLFlickrConnect::flickrConnectedCoro", - boost::bind(&LLFlickrConnect::flickrConnectedCoro, this, _1, auto_connect)); + boost::bind(&LLFlickrConnect::flickrConnectedCoro, this, auto_connect)); } void LLFlickrConnect::loadFlickrInfo() @@ -458,7 +458,7 @@ void LLFlickrConnect::loadFlickrInfo() if(mRefreshInfo) { LLCoros::instance().launch("LLFlickrConnect::flickrInfoCoro", - boost::bind(&LLFlickrConnect::flickrInfoCoro, this, _1)); + boost::bind(&LLFlickrConnect::flickrInfoCoro, this)); } } @@ -472,14 +472,14 @@ void LLFlickrConnect::uploadPhoto(const std::string& image_url, const std::strin body["safety_level"] = safety_level; LLCoros::instance().launch("LLFlickrConnect::flickrShareCoro", - boost::bind(&LLFlickrConnect::flickrShareCoro, this, _1, body)); + boost::bind(&LLFlickrConnect::flickrShareCoro, this, body)); } void LLFlickrConnect::uploadPhoto(LLPointer<LLImageFormatted> image, const std::string& title, const std::string& description, const std::string& tags, int safety_level) { LLCoros::instance().launch("LLFlickrConnect::flickrShareImageCoro", - boost::bind(&LLFlickrConnect::flickrShareImageCoro, this, _1, image, + boost::bind(&LLFlickrConnect::flickrShareImageCoro, this, image, title, description, tags, safety_level)); } diff --git a/indra/newview/llflickrconnect.h b/indra/newview/llflickrconnect.h index 26c63f8b08..0155804da0 100644 --- a/indra/newview/llflickrconnect.h +++ b/indra/newview/llflickrconnect.h @@ -97,12 +97,12 @@ private: static boost::scoped_ptr<LLEventPump> sContentWatcher; bool testShareStatus(LLSD &result); - void flickrConnectCoro(LLCoros::self& self, std::string requestToken, std::string oauthVerifier); - void flickrShareCoro(LLCoros::self& self, LLSD share); - void flickrShareImageCoro(LLCoros::self& self, LLPointer<LLImageFormatted> image, std::string title, std::string description, std::string tags, int safetyLevel); - void flickrDisconnectCoro(LLCoros::self& self); - void flickrConnectedCoro(LLCoros::self& self, bool autoConnect); - void flickrInfoCoro(LLCoros::self& self); + void flickrConnectCoro(std::string requestToken, std::string oauthVerifier); + void flickrShareCoro(LLSD share); + void flickrShareImageCoro(LLPointer<LLImageFormatted> image, std::string title, std::string description, std::string tags, int safetyLevel); + void flickrDisconnectCoro(); + void flickrConnectedCoro(bool autoConnect); + void flickrInfoCoro(); }; diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index e5e9a794a4..2824038f77 100755 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -457,7 +457,7 @@ BOOL LLFloaterAvatarPicker::visibleItemsSelected() const } /*static*/ -void LLFloaterAvatarPicker::findCoro(LLCoros::self& self, std::string url, LLUUID queryID, std::string name) +void LLFloaterAvatarPicker::findCoro(std::string url, LLUUID queryID, std::string name) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -466,7 +466,7 @@ void LLFloaterAvatarPicker::findCoro(LLCoros::self& self, std::string url, LLUUI LL_INFOS("HttpCoroutineAdapter", "genericPostCoro") << "Generic POST for " << 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); @@ -513,7 +513,7 @@ void LLFloaterAvatarPicker::find() LL_INFOS() << "avatar picker " << url << LL_ENDL; LLCoros::instance().launch("LLFloaterAvatarPicker::findCoro", - boost::bind(&LLFloaterAvatarPicker::findCoro, _1, url, mQueryID, getKey().asString())); + boost::bind(&LLFloaterAvatarPicker::findCoro, url, mQueryID, getKey().asString())); } else { diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h index 200f74278e..fbee61b054 100755 --- a/indra/newview/llfloateravatarpicker.h +++ b/indra/newview/llfloateravatarpicker.h @@ -86,7 +86,7 @@ private: void populateFriend(); BOOL visibleItemsSelected() const; // Returns true if any items in the current tab are selected. - static void findCoro(LLCoros::self& self, std::string url, LLUUID mQueryID, std::string mName); + static void findCoro(std::string url, LLUUID mQueryID, std::string mName); void find(); void setAllowMultiple(BOOL allow_multiple); LLScrollListCtrl* getActiveList(); diff --git a/indra/newview/llfloatermodeluploadbase.cpp b/indra/newview/llfloatermodeluploadbase.cpp index aa91a2ce03..e2f84fd990 100755 --- a/indra/newview/llfloatermodeluploadbase.cpp +++ b/indra/newview/llfloatermodeluploadbase.cpp @@ -49,7 +49,7 @@ void LLFloaterModelUploadBase::requestAgentUploadPermissions() << "::requestAgentUploadPermissions() requesting for upload model permissions from: " << url << LL_ENDL; LLCoros::instance().launch("LLFloaterModelUploadBase::requestAgentUploadPermissionsCoro", - boost::bind(&LLFloaterModelUploadBase::requestAgentUploadPermissionsCoro, this, _1, url, getPermObserverHandle())); + boost::bind(&LLFloaterModelUploadBase::requestAgentUploadPermissionsCoro, this, url, getPermObserverHandle())); } else { @@ -61,7 +61,7 @@ void LLFloaterModelUploadBase::requestAgentUploadPermissions() } } -void LLFloaterModelUploadBase::requestAgentUploadPermissionsCoro(LLCoros::self& self, std::string url, +void LLFloaterModelUploadBase::requestAgentUploadPermissionsCoro(std::string url, LLHandle<LLUploadPermissionsObserver> observerHandle) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); @@ -70,7 +70,7 @@ void LLFloaterModelUploadBase::requestAgentUploadPermissionsCoro(LLCoros::self& LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - 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/newview/llfloatermodeluploadbase.h b/indra/newview/llfloatermodeluploadbase.h index 9bb9959af0..0d4c834122 100755 --- a/indra/newview/llfloatermodeluploadbase.h +++ b/indra/newview/llfloatermodeluploadbase.h @@ -56,7 +56,7 @@ protected: // requests agent's permissions to upload model void requestAgentUploadPermissions(); - void requestAgentUploadPermissionsCoro(LLCoros::self& self, std::string url, LLHandle<LLUploadPermissionsObserver> observerHandle); + void requestAgentUploadPermissionsCoro(std::string url, LLHandle<LLUploadPermissionsObserver> observerHandle); std::string mUploadModelUrl; bool mHasUploadPerm; diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 06af2725c3..16bb449fdb 100755 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -182,7 +182,7 @@ void LLFloaterPermsDefault::updateCap() if(!object_url.empty()) { LLCoros::instance().launch("LLFloaterPermsDefault::updateCapCoro", - boost::bind(&LLFloaterPermsDefault::updateCapCoro, _1, object_url)); + boost::bind(&LLFloaterPermsDefault::updateCapCoro, object_url)); } else { @@ -191,7 +191,7 @@ void LLFloaterPermsDefault::updateCap() } /*static*/ -void LLFloaterPermsDefault::updateCapCoro(LLCoros::self& self, std::string url) +void LLFloaterPermsDefault::updateCapCoro(std::string url) { static std::string previousReason; LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); @@ -215,7 +215,7 @@ void LLFloaterPermsDefault::updateCapCoro(LLCoros::self& self, std::string url) LL_CONT << sent_perms_log.str() << LL_ENDL; } - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, postData); + LLSD result = httpAdapter->postAndYield(httpRequest, url, postData); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index ba7d39fe89..e866b6de7d 100755 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -82,7 +82,7 @@ private: void refresh(); static const std::string sCategoryNames[CAT_LAST]; - static void updateCapCoro(LLCoros::self& self, std::string url); + static void updateCapCoro(std::string url); // cached values only for implementing cancel. diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index be18565670..14719a77f9 100755 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -200,7 +200,7 @@ BOOL LLPanelScriptLimitsRegionMemory::getLandScriptResources() if (!url.empty()) { LLCoros::instance().launch("LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro", - boost::bind(&LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro, this, _1, url)); + boost::bind(&LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro, this, url)); return TRUE; } else @@ -209,7 +209,7 @@ BOOL LLPanelScriptLimitsRegionMemory::getLandScriptResources() } } -void LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro(LLCoros::self& self, std::string url) +void LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -220,7 +220,7 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro(LLCoros::self& postData["parcel_id"] = mParcelId; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, postData); + LLSD result = httpAdapter->postAndYield(httpRequest, url, postData); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -240,27 +240,27 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro(LLCoros::self& { std::string urlResourceSummary = result["ScriptResourceSummary"].asString(); LLCoros::instance().launch("LLPanelScriptLimitsRegionMemory::getLandScriptSummaryCoro", - boost::bind(&LLPanelScriptLimitsRegionMemory::getLandScriptSummaryCoro, this, _1, urlResourceSummary)); + boost::bind(&LLPanelScriptLimitsRegionMemory::getLandScriptSummaryCoro, this, urlResourceSummary)); } if (result.has("ScriptResourceDetails")) { std::string urlResourceDetails = result["ScriptResourceDetails"].asString(); LLCoros::instance().launch("LLPanelScriptLimitsRegionMemory::getLandScriptDetailsCoro", - boost::bind(&LLPanelScriptLimitsRegionMemory::getLandScriptDetailsCoro, this, _1, urlResourceDetails)); + boost::bind(&LLPanelScriptLimitsRegionMemory::getLandScriptDetailsCoro, this, urlResourceDetails)); } } -void LLPanelScriptLimitsRegionMemory::getLandScriptSummaryCoro(LLCoros::self& self, std::string url) +void LLPanelScriptLimitsRegionMemory::getLandScriptSummaryCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptSummaryCoro", httpPolicy)); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - 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); @@ -305,14 +305,14 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptSummaryCoro(LLCoros::self& se } -void LLPanelScriptLimitsRegionMemory::getLandScriptDetailsCoro(LLCoros::self& self, std::string url) +void LLPanelScriptLimitsRegionMemory::getLandScriptDetailsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptDetailsCoro", httpPolicy)); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - 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); @@ -947,7 +947,7 @@ BOOL LLPanelScriptLimitsAttachment::requestAttachmentDetails() if (!url.empty()) { LLCoros::instance().launch("LLPanelScriptLimitsAttachment::getAttachmentLimitsCoro", - boost::bind(&LLPanelScriptLimitsAttachment::getAttachmentLimitsCoro, this, _1, url)); + boost::bind(&LLPanelScriptLimitsAttachment::getAttachmentLimitsCoro, this, url)); return TRUE; } else @@ -956,14 +956,14 @@ BOOL LLPanelScriptLimitsAttachment::requestAttachmentDetails() } } -void LLPanelScriptLimitsAttachment::getAttachmentLimitsCoro(LLCoros::self& self, std::string url) +void LLPanelScriptLimitsAttachment::getAttachmentLimitsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getAttachmentLimitsCoro", httpPolicy)); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - 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/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h index 030020087b..e3cbbd185f 100755 --- a/indra/newview/llfloaterscriptlimits.h +++ b/indra/newview/llfloaterscriptlimits.h @@ -132,9 +132,9 @@ private: std::vector<LLSD> mObjectListItems; - void getLandScriptResourcesCoro(LLCoros::self& self, std::string url); - void getLandScriptSummaryCoro(LLCoros::self& self, std::string url); - void getLandScriptDetailsCoro(LLCoros::self& self, std::string url); + void getLandScriptResourcesCoro(std::string url); + void getLandScriptSummaryCoro(std::string url); + void getLandScriptDetailsCoro(std::string url); protected: @@ -180,7 +180,7 @@ public: void clearList(); private: - void getAttachmentLimitsCoro(LLCoros::self& self, std::string url); + void getAttachmentLimitsCoro(std::string url); bool mGotAttachmentMemoryUsed; S32 mAttachmentMemoryMax; diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 27938bfbc4..6dc08417d7 100755 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -190,7 +190,7 @@ void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev std::string url(getString("real_url")); LLCoros::instance().launch("LLFloaterTOS::testSiteIsAliveCoro", - boost::bind(&LLFloaterTOS::testSiteIsAliveCoro, this, _1, url)); + boost::bind(&LLFloaterTOS::testSiteIsAliveCoro, this, url)); } else if(mRealNavigateBegun) { @@ -202,7 +202,7 @@ void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev } } -void LLFloaterTOS::testSiteIsAliveCoro(LLCoros::self& self, std::string url) +void LLFloaterTOS::testSiteIsAliveCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -214,7 +214,7 @@ void LLFloaterTOS::testSiteIsAliveCoro(LLCoros::self& self, std::string url) LL_INFOS("HttpCoroutineAdapter", "genericPostCoro") << "Generic POST for " << 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/newview/llfloatertos.h b/indra/newview/llfloatertos.h index 90bea2fe83..2748b20513 100755 --- a/indra/newview/llfloatertos.h +++ b/indra/newview/llfloatertos.h @@ -62,7 +62,7 @@ public: /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); private: - void testSiteIsAliveCoro(LLCoros::self& self, std::string url); + void testSiteIsAliveCoro(std::string url); std::string mMessage; bool mLoadingScreenLoaded; diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 110d760dc9..6683a6e6e6 100755 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -194,7 +194,7 @@ void LLFloaterURLEntry::onBtnOK( void* userdata ) (scheme == "http" || scheme == "https")) { LLCoros::instance().launch("LLFloaterURLEntry::getMediaTypeCoro", - boost::bind(&LLFloaterURLEntry::getMediaTypeCoro, _1, media_url, self->getHandle())); + boost::bind(&LLFloaterURLEntry::getMediaTypeCoro, media_url, self->getHandle())); } else { @@ -208,7 +208,7 @@ void LLFloaterURLEntry::onBtnOK( void* userdata ) } // static -void LLFloaterURLEntry::getMediaTypeCoro(LLCoros::self& self, std::string url, LLHandle<LLFloater> parentHandle) +void LLFloaterURLEntry::getMediaTypeCoro(std::string url, LLHandle<LLFloater> parentHandle) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -220,7 +220,7 @@ void LLFloaterURLEntry::getMediaTypeCoro(LLCoros::self& self, std::string url, L LL_INFOS("HttpCoroutineAdapter", "genericPostCoro") << "Generic POST for " << url << LL_ENDL; - LLSD result = httpAdapter->getAndYield(self, httpRequest, url, httpOpts); + LLSD result = httpAdapter->getAndYield(httpRequest, url, httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); diff --git a/indra/newview/llfloaterurlentry.h b/indra/newview/llfloaterurlentry.h index 2f5afa653d..20f4604907 100755 --- a/indra/newview/llfloaterurlentry.h +++ b/indra/newview/llfloaterurlentry.h @@ -60,7 +60,7 @@ private: static void onBtnClear(void*); bool callback_clear_url_list(const LLSD& notification, const LLSD& response); - static void getMediaTypeCoro(LLCoros::self& self, std::string url, LLHandle<LLFloater> parentHandle); + static void getMediaTypeCoro(std::string url, LLHandle<LLFloater> parentHandle); }; diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 0fb39ab02e..edae0bfd19 100755 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -1862,7 +1862,7 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id, group_datap->mMemberVersion.generate(); } -void LLGroupMgr::getGroupBanRequestCoro(LLCoros::self& self, std::string url, LLUUID groupId) +void LLGroupMgr::getGroupBanRequestCoro(std::string url, LLUUID groupId) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -1871,7 +1871,7 @@ void LLGroupMgr::getGroupBanRequestCoro(LLCoros::self& self, std::string url, LL std::string finalUrl = url + "?group_id=" + groupId.asString(); - LLSD result = httpAdapter->getAndYield(self, httpRequest, finalUrl); + LLSD result = httpAdapter->getAndYield(httpRequest, finalUrl); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -1890,7 +1890,7 @@ void LLGroupMgr::getGroupBanRequestCoro(LLCoros::self& self, std::string url, LL } } -void LLGroupMgr::postGroupBanRequestCoro(LLCoros::self& self, std::string url, LLUUID groupId, +void LLGroupMgr::postGroupBanRequestCoro(std::string url, LLUUID groupId, U32 action, uuid_vec_t banList, bool update) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); @@ -1922,7 +1922,7 @@ void LLGroupMgr::postGroupBanRequestCoro(LLCoros::self& self, std::string url, L LL_WARNS() << "post: " << ll_pretty_print_sd(postData) << LL_ENDL; - LLSD result = httpAdapter->postAndYield(self, httpRequest, finalUrl, postData, httpOptions, httpHeaders); + LLSD result = httpAdapter->postAndYield(httpRequest, finalUrl, postData, httpOptions, httpHeaders); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -1942,7 +1942,7 @@ void LLGroupMgr::postGroupBanRequestCoro(LLCoros::self& self, std::string url, L if (update) { - getGroupBanRequestCoro(self, url, groupId); + getGroupBanRequestCoro(url, groupId); } } @@ -1979,11 +1979,11 @@ void LLGroupMgr::sendGroupBanRequest( EBanRequestType request_type, { case REQUEST_GET: LLCoros::instance().launch("LLGroupMgr::getGroupBanRequestCoro", - boost::bind(&LLGroupMgr::getGroupBanRequestCoro, this, _1, cap_url, group_id)); + boost::bind(&LLGroupMgr::getGroupBanRequestCoro, this, cap_url, group_id)); break; case REQUEST_POST: LLCoros::instance().launch("LLGroupMgr::postGroupBanRequestCoro", - boost::bind(&LLGroupMgr::postGroupBanRequestCoro, this, _1, cap_url, group_id, + boost::bind(&LLGroupMgr::postGroupBanRequestCoro, this, cap_url, group_id, action, ban_list, update)); break; case REQUEST_PUT: @@ -2028,7 +2028,7 @@ void LLGroupMgr::processGroupBanRequest(const LLSD& content) LLGroupMgr::getInstance()->notifyObservers(GC_BANLIST); } -void LLGroupMgr::groupMembersRequestCoro(LLCoros::self& self, std::string url, LLUUID groupId) +void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID groupId) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -2041,7 +2041,7 @@ void LLGroupMgr::groupMembersRequestCoro(LLCoros::self& self, std::string url, L LLSD postData = LLSD::emptyMap(); postData["group_id"] = groupId; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, postData, httpOpts); + LLSD result = httpAdapter->postAndYield(httpRequest, url, postData, httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -2095,7 +2095,7 @@ void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id) lastGroupMemberRequestFrame = gFrameCount; LLCoros::instance().launch("LLGroupMgr::groupMembersRequestCoro", - boost::bind(&LLGroupMgr::groupMembersRequestCoro, this, _1, cap_url, group_id)); + boost::bind(&LLGroupMgr::groupMembersRequestCoro, this, cap_url, group_id)); } diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h index 1163923eff..fd0c2de854 100755 --- a/indra/newview/llgroupmgr.h +++ b/indra/newview/llgroupmgr.h @@ -428,11 +428,11 @@ public: void clearGroupData(const LLUUID& group_id); private: - void groupMembersRequestCoro(LLCoros::self& self, std::string url, LLUUID groupId); + void groupMembersRequestCoro(std::string url, LLUUID groupId); void processCapGroupMembersRequest(const LLSD& content); - void getGroupBanRequestCoro(LLCoros::self& self, std::string url, LLUUID groupId); - void postGroupBanRequestCoro(LLCoros::self& self, std::string url, LLUUID groupId, U32 action, uuid_vec_t banList, bool update); + void getGroupBanRequestCoro(std::string url, LLUUID groupId); + void postGroupBanRequestCoro(std::string url, LLUUID groupId, U32 action, uuid_vec_t banList, bool update); static void processGroupBanRequest(const LLSD& content); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 0e5c16752e..8d670d0b0a 100755 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -79,8 +79,8 @@ const static std::string NEARBY_P2P_BY_AGENT("nearby_P2P_by_agent"); /** Timeout of outgoing session initialization (in seconds) */ const static U32 SESSION_INITIALIZATION_TIMEOUT = 30; -void startConfrenceCoro(LLCoros::self& self, std::string url, LLUUID tempSessionId, LLUUID creatorId, LLUUID otherParticipantId, LLSD agents); -void chatterBoxInvitationCoro(LLCoros::self& self, std::string url, LLUUID sessionId, LLIMMgr::EInvitationType invitationType); +void startConfrenceCoro(std::string url, LLUUID tempSessionId, LLUUID creatorId, LLUUID otherParticipantId, LLSD agents); +void chatterBoxInvitationCoro(std::string url, LLUUID sessionId, LLIMMgr::EInvitationType invitationType); void start_deprecated_conference_chat(const LLUUID& temp_session_id, const LLUUID& creator_id, const LLUUID& other_participant_id, const LLSD& agents_to_invite); std::string LLCallDialogManager::sPreviousSessionlName = ""; @@ -389,7 +389,7 @@ void on_new_message(const LLSD& msg) notify_of_message(msg, false); } -void startConfrenceCoro(LLCoros::self& self, std::string url, +void startConfrenceCoro(std::string url, LLUUID tempSessionId, LLUUID creatorId, LLUUID otherParticipantId, LLSD agents) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); @@ -402,7 +402,7 @@ void startConfrenceCoro(LLCoros::self& self, std::string url, postData["session-id"] = tempSessionId; postData["params"] = agents; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, postData); + LLSD result = httpAdapter->postAndYield(httpRequest, url, postData); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -430,7 +430,7 @@ void startConfrenceCoro(LLCoros::self& self, std::string url, } } -void chatterBoxInvitationCoro(LLCoros::self& self, std::string url, LLUUID sessionId, LLIMMgr::EInvitationType invitationType) +void chatterBoxInvitationCoro(std::string url, LLUUID sessionId, LLIMMgr::EInvitationType invitationType) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -441,7 +441,7 @@ void chatterBoxInvitationCoro(LLCoros::self& self, std::string url, LLUUID sessi postData["method"] = "accept invitation"; postData["session-id"] = sessionId; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, postData); + LLSD result = httpAdapter->postAndYield(httpRequest, url, postData); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -1623,7 +1623,7 @@ bool LLIMModel::sendStartSession( "ChatSessionRequest"); LLCoros::instance().launch("startConfrenceCoro", - boost::bind(&startConfrenceCoro, _1, url, + boost::bind(&startConfrenceCoro, url, temp_session_id, gAgent.getID(), other_participant_id, agents)); } else @@ -2468,7 +2468,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload if (voice) { LLCoros::instance().launch("chatterBoxInvitationCoro", - boost::bind(&chatterBoxInvitationCoro, _1, url, + boost::bind(&chatterBoxInvitationCoro, url, session_id, inv_type)); // send notification message to the corresponding chat @@ -2555,7 +2555,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) "ChatSessionRequest"); LLCoros::instance().launch("chatterBoxInvitationCoro", - boost::bind(&chatterBoxInvitationCoro, _1, url, + boost::bind(&chatterBoxInvitationCoro, url, session_id, inv_type)); } } @@ -3646,7 +3646,7 @@ public: if ( url != "" ) { LLCoros::instance().launch("chatterBoxInvitationCoro", - boost::bind(&chatterBoxInvitationCoro, _1, url, + boost::bind(&chatterBoxInvitationCoro, url, session_id, LLIMMgr::INVITATION_TYPE_INSTANT_MESSAGE)); } } //end if invitation has instant message diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 39aeab22e5..47d3e88b3a 100755 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -571,7 +571,7 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, LL_DEBUGS(LOG_INV) << "create category request: " << ll_pretty_print_sd(request) << LL_ENDL; LLCoros::instance().launch("LLInventoryModel::createNewCategoryCoro", - boost::bind(&LLInventoryModel::createNewCategoryCoro, this, _1, url, body, callback)); + boost::bind(&LLInventoryModel::createNewCategoryCoro, this, url, body, callback)); return LLUUID::null; } @@ -600,7 +600,7 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, return id; } -void LLInventoryModel::createNewCategoryCoro(LLCoros::self& self, std::string url, LLSD postData, inventory_func_type callback) +void LLInventoryModel::createNewCategoryCoro(std::string url, LLSD postData, inventory_func_type callback) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -613,7 +613,7 @@ void LLInventoryModel::createNewCategoryCoro(LLCoros::self& self, std::string ur LL_INFOS("HttpCoroutineAdapter", "genericPostCoro") << "Generic POST for " << url << LL_ENDL; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, postData, httpOpts); + LLSD result = httpAdapter->postAndYield(httpRequest, url, postData, httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index f768e61ccb..e8977bc7d7 100755 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -444,7 +444,7 @@ protected: void addCategory(LLViewerInventoryCategory* category); void addItem(LLViewerInventoryItem* item); - void createNewCategoryCoro(LLCoros::self& self, std::string url, LLSD postData, inventory_func_type callback); + void createNewCategoryCoro(std::string url, LLSD postData, inventory_func_type callback); /** Mutators ** ** diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index bd77912a6c..38c4382654 100755 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -126,7 +126,7 @@ namespace LLMarketplaceImport // Responders #if 1 - void marketplacePostCoro(LLCoros::self& self, std::string url) + void marketplacePostCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -144,7 +144,7 @@ namespace LLMarketplaceImport httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_XML); httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, LLViewerMedia::getCurrentUserAgent()); - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, LLSD(), httpOpts, httpHeaders); + LLSD result = httpAdapter->postAndYield(httpRequest, url, LLSD(), httpOpts, httpHeaders); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -237,7 +237,7 @@ namespace LLMarketplaceImport #endif #if 1 - void marketplaceGetCoro(LLCoros::self& self, std::string url, bool buildHeaders) + void marketplaceGetCoro(std::string url, bool buildHeaders) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -263,7 +263,7 @@ namespace LLMarketplaceImport httpHeaders = LLViewerMedia::getHttpHeaders(); } - LLSD result = httpAdapter->getAndYield(self, httpRequest, url, httpOpts, httpHeaders); + LLSD result = httpAdapter->getAndYield(httpRequest, url, httpOpts, httpHeaders); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -405,7 +405,7 @@ namespace LLMarketplaceImport #if 1 LLCoros::instance().launch("marketplaceGetCoro", - boost::bind(&marketplaceGetCoro, _1, url, false)); + boost::bind(&marketplaceGetCoro, url, false)); #else if (gSavedSettings.getBOOL("InventoryOutboxLogging")) @@ -439,7 +439,7 @@ namespace LLMarketplaceImport #if 1 LLCoros::instance().launch("marketplaceGetCoro", - boost::bind(&marketplaceGetCoro, _1, url, true)); + boost::bind(&marketplaceGetCoro, url, true)); #else // Make the headers for the post @@ -482,7 +482,7 @@ namespace LLMarketplaceImport #if 1 LLCoros::instance().launch("marketplacePostCoro", - boost::bind(&marketplacePostCoro, _1, url)); + boost::bind(&marketplacePostCoro, url)); #else // Make the headers for the post diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index 5dc90c987d..2e6937a79f 100755 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -225,7 +225,7 @@ void LLPathfindingManager::requestGetNavMeshForRegion(LLViewerRegion *pRegion, b U64 regionHandle = pRegion->getHandle(); std::string coroname = LLCoros::instance().launch("LLPathfindingManager::navMeshStatusRequestCoro", - boost::bind(&LLPathfindingManager::navMeshStatusRequestCoro, this, _1, navMeshStatusURL, regionHandle, pIsGetStatusOnly)); + boost::bind(&LLPathfindingManager::navMeshStatusRequestCoro, this, navMeshStatusURL, regionHandle, pIsGetStatusOnly)); } } @@ -259,12 +259,12 @@ void LLPathfindingManager::requestGetLinksets(request_id_t pRequestId, object_re LinksetsResponder::ptr_t linksetsResponderPtr(new LinksetsResponder(pRequestId, pLinksetsCallback, true, doRequestTerrain)); std::string coroname = LLCoros::instance().launch("LLPathfindingManager::linksetObjectsCoro", - boost::bind(&LLPathfindingManager::linksetObjectsCoro, this, _1, objectLinksetsURL, linksetsResponderPtr, LLSD())); + boost::bind(&LLPathfindingManager::linksetObjectsCoro, this, objectLinksetsURL, linksetsResponderPtr, LLSD())); if (doRequestTerrain) { std::string coroname = LLCoros::instance().launch("LLPathfindingManager::linksetTerrainCoro", - boost::bind(&LLPathfindingManager::linksetTerrainCoro, this, _1, terrainLinksetsURL, linksetsResponderPtr, LLSD())); + boost::bind(&LLPathfindingManager::linksetTerrainCoro, this, terrainLinksetsURL, linksetsResponderPtr, LLSD())); } } } @@ -308,13 +308,13 @@ void LLPathfindingManager::requestSetLinksets(request_id_t pRequestId, const LLP if (!objectPostData.isUndefined()) { std::string coroname = LLCoros::instance().launch("LLPathfindingManager::linksetObjectsCoro", - boost::bind(&LLPathfindingManager::linksetObjectsCoro, this, _1, objectLinksetsURL, linksetsResponderPtr, objectPostData)); + boost::bind(&LLPathfindingManager::linksetObjectsCoro, this, objectLinksetsURL, linksetsResponderPtr, objectPostData)); } if (!terrainPostData.isUndefined()) { std::string coroname = LLCoros::instance().launch("LLPathfindingManager::linksetTerrainCoro", - boost::bind(&LLPathfindingManager::linksetTerrainCoro, this, _1, terrainLinksetsURL, linksetsResponderPtr, terrainPostData)); + boost::bind(&LLPathfindingManager::linksetTerrainCoro, this, terrainLinksetsURL, linksetsResponderPtr, terrainPostData)); } } } @@ -347,7 +347,7 @@ void LLPathfindingManager::requestGetCharacters(request_id_t pRequestId, object_ pCharactersCallback(pRequestId, kRequestStarted, emptyCharacterListPtr); std::string coroname = LLCoros::instance().launch("LLPathfindingManager::charactersCoro", - boost::bind(&LLPathfindingManager::charactersCoro, this, _1, charactersURL, pRequestId, pCharactersCallback)); + boost::bind(&LLPathfindingManager::charactersCoro, this, charactersURL, pRequestId, pCharactersCallback)); } } } @@ -381,7 +381,7 @@ void LLPathfindingManager::requestGetAgentState() llassert(!agentStateURL.empty()); std::string coroname = LLCoros::instance().launch("LLPathfindingManager::navAgentStateRequestCoro", - boost::bind(&LLPathfindingManager::navAgentStateRequestCoro, this, _1, agentStateURL)); + boost::bind(&LLPathfindingManager::navAgentStateRequestCoro, this, agentStateURL)); } } } @@ -404,7 +404,7 @@ void LLPathfindingManager::requestRebakeNavMesh(rebake_navmesh_callback_t pRebak llassert(!navMeshStatusURL.empty()); std::string coroname = LLCoros::instance().launch("LLPathfindingManager::navMeshRebakeCoro", - boost::bind(&LLPathfindingManager::navMeshRebakeCoro, this, _1, navMeshStatusURL, pRebakeNavMeshCallback)); + boost::bind(&LLPathfindingManager::navMeshRebakeCoro, this, navMeshStatusURL, pRebakeNavMeshCallback)); } } @@ -448,7 +448,7 @@ void LLPathfindingManager::handleDeferredGetCharactersForRegion(const LLUUID &pR } } -void LLPathfindingManager::navMeshStatusRequestCoro(LLCoros::self& self, std::string url, U64 regionHandle, bool isGetStatusOnly) +void LLPathfindingManager::navMeshStatusRequestCoro(std::string url, U64 regionHandle, bool isGetStatusOnly) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -464,7 +464,7 @@ void LLPathfindingManager::navMeshStatusRequestCoro(LLCoros::self& self, std::st LLUUID regionUUID = region->getRegionID(); region = NULL; - LLSD result = httpAdapter->getAndYield(self, httpRequest, url); + LLSD result = httpAdapter->getAndYield(httpRequest, url); region = LLWorld::getInstance()->getRegionFromHandle(regionHandle); @@ -519,7 +519,7 @@ void LLPathfindingManager::navMeshStatusRequestCoro(LLCoros::self& self, std::st navMeshPtr->handleNavMeshStart(navMeshStatus); LLSD postData; - result = httpAdapter->postAndYield(self, httpRequest, navMeshURL, postData); + result = httpAdapter->postAndYield(httpRequest, navMeshURL, postData); U32 navMeshVersion = navMeshStatus.getVersion(); @@ -538,14 +538,14 @@ void LLPathfindingManager::navMeshStatusRequestCoro(LLCoros::self& self, std::st } -void LLPathfindingManager::navAgentStateRequestCoro(LLCoros::self& self, std::string url) +void LLPathfindingManager::navAgentStateRequestCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("NavAgentStateRequest", httpPolicy)); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - 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); @@ -566,7 +566,7 @@ void LLPathfindingManager::navAgentStateRequestCoro(LLCoros::self& self, std::st handleAgentState(canRebake); } -void LLPathfindingManager::navMeshRebakeCoro(LLCoros::self& self, std::string url, rebake_navmesh_callback_t rebakeNavMeshCallback) +void LLPathfindingManager::navMeshRebakeCoro(std::string url, rebake_navmesh_callback_t rebakeNavMeshCallback) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -577,7 +577,7 @@ void LLPathfindingManager::navMeshRebakeCoro(LLCoros::self& self, std::string ur LLSD postData = LLSD::emptyMap(); postData["command"] = "rebuild"; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, postData); + LLSD result = httpAdapter->postAndYield(httpRequest, url, postData); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -595,7 +595,7 @@ void LLPathfindingManager::navMeshRebakeCoro(LLCoros::self& self, std::string ur // If called with putData undefined this coroutine will issue a get. If there // is data in putData it will be PUT to the URL. -void LLPathfindingManager::linksetObjectsCoro(LLCoros::self &self, std::string url, LinksetsResponder::ptr_t linksetsResponsderPtr, LLSD putData) const +void LLPathfindingManager::linksetObjectsCoro(std::string url, LinksetsResponder::ptr_t linksetsResponsderPtr, LLSD putData) const { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -606,11 +606,11 @@ void LLPathfindingManager::linksetObjectsCoro(LLCoros::self &self, std::string u if (putData.isUndefined()) { - result = httpAdapter->getAndYield(self, httpRequest, url); + result = httpAdapter->getAndYield(httpRequest, url); } else { - result = httpAdapter->putAndYield(self, httpRequest, url, putData); + result = httpAdapter->putAndYield(httpRequest, url, putData); } LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; @@ -631,7 +631,7 @@ void LLPathfindingManager::linksetObjectsCoro(LLCoros::self &self, std::string u // If called with putData undefined this coroutine will issue a GET. If there // is data in putData it will be PUT to the URL. -void LLPathfindingManager::linksetTerrainCoro(LLCoros::self &self, std::string url, LinksetsResponder::ptr_t linksetsResponsderPtr, LLSD putData) const +void LLPathfindingManager::linksetTerrainCoro(std::string url, LinksetsResponder::ptr_t linksetsResponsderPtr, LLSD putData) const { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -642,11 +642,11 @@ void LLPathfindingManager::linksetTerrainCoro(LLCoros::self &self, std::string u if (putData.isUndefined()) { - result = httpAdapter->getAndYield(self, httpRequest, url); + result = httpAdapter->getAndYield(httpRequest, url); } else { - result = httpAdapter->putAndYield(self, httpRequest, url, putData); + result = httpAdapter->putAndYield(httpRequest, url, putData); } LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; @@ -666,14 +666,14 @@ void LLPathfindingManager::linksetTerrainCoro(LLCoros::self &self, std::string u } -void LLPathfindingManager::charactersCoro(LLCoros::self &self, std::string url, request_id_t requestId, object_request_callback_t callback) const +void LLPathfindingManager::charactersCoro(std::string url, request_id_t requestId, object_request_callback_t callback) const { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("LinksetTerrain", httpPolicy)); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - 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/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h index abf611801c..e8fad590ba 100755 --- a/indra/newview/llpathfindingmanager.h +++ b/indra/newview/llpathfindingmanager.h @@ -104,12 +104,12 @@ private: void handleDeferredGetLinksetsForRegion(const LLUUID &pRegionUUID, request_id_t pRequestId, object_request_callback_t pLinksetsCallback) const; void handleDeferredGetCharactersForRegion(const LLUUID &pRegionUUID, request_id_t pRequestId, object_request_callback_t pCharactersCallback) const; - void navMeshStatusRequestCoro(LLCoros::self& self, std::string url, U64 regionHandle, bool isGetStatusOnly); - void navAgentStateRequestCoro(LLCoros::self& self, std::string url); - void navMeshRebakeCoro(LLCoros::self& self, std::string url, rebake_navmesh_callback_t rebakeNavMeshCallback); - void linksetObjectsCoro(LLCoros::self &self, std::string url, boost::shared_ptr<LinksetsResponder> linksetsResponsderPtr, LLSD putData) const; - void linksetTerrainCoro(LLCoros::self &self, std::string url, boost::shared_ptr<LinksetsResponder> linksetsResponsderPtr, LLSD putData) const; - void charactersCoro(LLCoros::self &self, std::string url, request_id_t requestId, object_request_callback_t callback) const; + void navMeshStatusRequestCoro(std::string url, U64 regionHandle, bool isGetStatusOnly); + void navAgentStateRequestCoro(std::string url); + void navMeshRebakeCoro(std::string url, rebake_navmesh_callback_t rebakeNavMeshCallback); + void linksetObjectsCoro(std::string url, boost::shared_ptr<LinksetsResponder> linksetsResponsderPtr, LLSD putData) const; + void linksetTerrainCoro(std::string url, boost::shared_ptr<LinksetsResponder> linksetsResponsderPtr, LLSD putData) const; + void charactersCoro(std::string url, request_id_t requestId, object_request_callback_t callback) const; //void handleNavMeshStatusRequest(const LLPathfindingNavMeshStatus &pNavMeshStatus, LLViewerRegion *pRegion, bool pIsGetStatusOnly); void handleNavMeshStatusUpdate(const LLPathfindingNavMeshStatus &pNavMeshStatus); diff --git a/indra/newview/llproductinforequest.cpp b/indra/newview/llproductinforequest.cpp index fd948765b3..467e9df482 100755 --- a/indra/newview/llproductinforequest.cpp +++ b/indra/newview/llproductinforequest.cpp @@ -45,7 +45,7 @@ void LLProductInfoRequestManager::initSingleton() if (!url.empty()) { LLCoros::instance().launch("LLProductInfoRequestManager::getLandDescriptionsCoro", - boost::bind(&LLProductInfoRequestManager::getLandDescriptionsCoro, this, _1, url)); + boost::bind(&LLProductInfoRequestManager::getLandDescriptionsCoro, this, url)); } } @@ -66,14 +66,14 @@ std::string LLProductInfoRequestManager::getDescriptionForSku(const std::string& return LLTrans::getString("land_type_unknown"); } -void LLProductInfoRequestManager::getLandDescriptionsCoro(LLCoros::self& self, std::string url) +void LLProductInfoRequestManager::getLandDescriptionsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - 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/newview/llproductinforequest.h b/indra/newview/llproductinforequest.h index 3ddae95a93..75dbf220d1 100755 --- a/indra/newview/llproductinforequest.h +++ b/indra/newview/llproductinforequest.h @@ -49,7 +49,7 @@ private: friend class LLSingleton<LLProductInfoRequestManager>; /* virtual */ void initSingleton(); - void getLandDescriptionsCoro(LLCoros::self& self, std::string url); + void getLandDescriptionsCoro(std::string url); LLSD mSkuDescriptions; }; diff --git a/indra/newview/llremoteparcelrequest.cpp b/indra/newview/llremoteparcelrequest.cpp index 7e8e9ac18e..06bf90c7cb 100755 --- a/indra/newview/llremoteparcelrequest.cpp +++ b/indra/newview/llremoteparcelrequest.cpp @@ -170,7 +170,7 @@ bool LLRemoteParcelInfoProcessor::requestRegionParcelInfo(const std::string &url if (!url.empty()) { LLCoros::instance().launch("LLRemoteParcelInfoProcessor::regionParcelInfoCoro", - boost::bind(&LLRemoteParcelInfoProcessor::regionParcelInfoCoro, this, _1, url, + boost::bind(&LLRemoteParcelInfoProcessor::regionParcelInfoCoro, this, url, regionId, regionPos, globalPos, observerHandle)); return true; } @@ -178,7 +178,7 @@ bool LLRemoteParcelInfoProcessor::requestRegionParcelInfo(const std::string &url return false; } -void LLRemoteParcelInfoProcessor::regionParcelInfoCoro(LLCoros::self& self, std::string url, +void LLRemoteParcelInfoProcessor::regionParcelInfoCoro(std::string url, LLUUID regionId, LLVector3 posRegion, LLVector3d posGlobal, LLHandle<LLRemoteParcelInfoObserver> observerHandle) { @@ -200,7 +200,7 @@ void LLRemoteParcelInfoProcessor::regionParcelInfoCoro(LLCoros::self& self, std: bodyData["region_handle"] = ll_sd_from_U64(regionHandle); } - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, bodyData); + LLSD result = httpAdapter->postAndYield(httpRequest, url, bodyData); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); diff --git a/indra/newview/llremoteparcelrequest.h b/indra/newview/llremoteparcelrequest.h index 982a1590e5..cb5af50c5f 100755 --- a/indra/newview/llremoteparcelrequest.h +++ b/indra/newview/llremoteparcelrequest.h @@ -91,7 +91,7 @@ private: typedef std::multimap<LLUUID, LLHandle<LLRemoteParcelInfoObserver> > observer_multimap_t; observer_multimap_t mObservers; - void regionParcelInfoCoro(LLCoros::self& self, std::string url, LLUUID regionId, LLVector3 posRegion, LLVector3d posGlobal, LLHandle<LLRemoteParcelInfoObserver> observerHandle); + void regionParcelInfoCoro(std::string url, LLUUID regionId, LLVector3 posRegion, LLVector3d posGlobal, LLHandle<LLRemoteParcelInfoObserver> observerHandle); }; #endif // LL_LLREMOTEPARCELREQUEST_H diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 9a9739c9cb..3b060d8343 100755 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -841,7 +841,7 @@ void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id) data["params"]["mute_info"]["text"] = !speakerp->mModeratorMutedText; LLCoros::instance().launch("LLIMSpeakerMgr::moderationActionCoro", - boost::bind(&LLIMSpeakerMgr::moderationActionCoro, this, _1, url, data)); + boost::bind(&LLIMSpeakerMgr::moderationActionCoro, this, url, data)); } void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute) @@ -866,10 +866,10 @@ void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmu data["params"]["mute_info"]["voice"] = !unmute; LLCoros::instance().launch("LLIMSpeakerMgr::moderationActionCoro", - boost::bind(&LLIMSpeakerMgr::moderationActionCoro, this, _1, url, data)); + boost::bind(&LLIMSpeakerMgr::moderationActionCoro, this, url, data)); } -void LLIMSpeakerMgr::moderationActionCoro(LLCoros::self& self, std::string url, LLSD action) +void LLIMSpeakerMgr::moderationActionCoro(std::string url, LLSD action) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -881,7 +881,7 @@ void LLIMSpeakerMgr::moderationActionCoro(LLCoros::self& self, std::string url, LLUUID sessionId = action["session-id"]; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, action, httpOpts); + LLSD result = httpAdapter->postAndYield(httpRequest, url, action, httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -948,7 +948,7 @@ void LLIMSpeakerMgr::moderateVoiceSession(const LLUUID& session_id, bool disallo data["params"]["update_info"]["moderated_mode"]["voice"] = disallow_voice; LLCoros::instance().launch("LLIMSpeakerMgr::moderationActionCoro", - boost::bind(&LLIMSpeakerMgr::moderationActionCoro, this, _1, url, data)); + boost::bind(&LLIMSpeakerMgr::moderationActionCoro, this, url, data)); } void LLIMSpeakerMgr::forceVoiceModeratedMode(bool should_be_muted) diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 1f3b2f584c..5cff70f377 100755 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -335,7 +335,7 @@ protected: */ void forceVoiceModeratedMode(bool should_be_muted); - void moderationActionCoro(LLCoros::self& self, std::string url, LLSD action); + void moderationActionCoro(std::string url, LLSD action); }; diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index d2197dcb4f..7f286044d6 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -108,14 +108,14 @@ bool LLSyntaxIdLSL::syntaxIdChanged() void LLSyntaxIdLSL::fetchKeywordsFile(const std::string& filespec) { LLCoros::instance().launch("LLSyntaxIdLSL::fetchKeywordsFileCoro", - boost::bind(&LLSyntaxIdLSL::fetchKeywordsFileCoro, this, _1, mCapabilityURL, filespec)); + boost::bind(&LLSyntaxIdLSL::fetchKeywordsFileCoro, this, mCapabilityURL, filespec)); LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId capability URL is: " << mCapabilityURL << ". Filename to use is: '" << filespec << "'." << LL_ENDL; } //----------------------------------------------------------------------------- // fetchKeywordsFileCoro //----------------------------------------------------------------------------- -void LLSyntaxIdLSL::fetchKeywordsFileCoro(LLCoros::self& self, std::string url, std::string fileSpec) +void LLSyntaxIdLSL::fetchKeywordsFileCoro(std::string url, std::string fileSpec) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -129,7 +129,7 @@ void LLSyntaxIdLSL::fetchKeywordsFileCoro(LLCoros::self& self, std::string url, return; } - 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/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 47de94cea2..0afa6dc04b 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -57,7 +57,7 @@ private: void loadDefaultKeywordsIntoLLSD(); void loadKeywordsIntoLLSD(); - void fetchKeywordsFileCoro(LLCoros::self& self, std::string url, std::string fileSpec); + void fetchKeywordsFileCoro(std::string url, std::string fileSpec); void cacheFile(const std::string &fileSpec, const LLSD& content_ref); std::string mCapabilityURL; diff --git a/indra/newview/lltwitterconnect.cpp b/indra/newview/lltwitterconnect.cpp index 09435850c3..c6a0a15759 100644 --- a/indra/newview/lltwitterconnect.cpp +++ b/indra/newview/lltwitterconnect.cpp @@ -67,7 +67,7 @@ void toast_user_for_twitter_success() /////////////////////////////////////////////////////////////////////////////// // -void LLTwitterConnect::twitterConnectCoro(LLCoros::self& self, std::string requestToken, std::string oauthVerifier) +void LLTwitterConnect::twitterConnectCoro(std::string requestToken, std::string oauthVerifier) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -86,7 +86,7 @@ void LLTwitterConnect::twitterConnectCoro(LLCoros::self& self, std::string reque setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_IN_PROGRESS); - LLSD result = httpAdapter->putAndYield(self, httpRequest, getTwitterConnectURL("/connection"), body, httpOpts); + LLSD result = httpAdapter->putAndYield(httpRequest, getTwitterConnectURL("/connection"), body, httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -157,7 +157,7 @@ bool LLTwitterConnect::testShareStatus(LLSD &result) return false; } -void LLTwitterConnect::twitterShareCoro(LLCoros::self& self, std::string route, LLSD share) +void LLTwitterConnect::twitterShareCoro(std::string route, LLSD share) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -170,7 +170,7 @@ void LLTwitterConnect::twitterShareCoro(LLCoros::self& self, std::string route, setConnectionState(LLTwitterConnect::TWITTER_POSTING); - LLSD result = httpAdapter->postAndYield(self, httpRequest, getTwitterConnectURL(route, true), share, httpOpts); + LLSD result = httpAdapter->postAndYield(httpRequest, getTwitterConnectURL(route, true), share, httpOpts); if (testShareStatus(result)) { @@ -180,7 +180,7 @@ void LLTwitterConnect::twitterShareCoro(LLCoros::self& self, std::string route, } } -void LLTwitterConnect::twitterShareImageCoro(LLCoros::self& self, LLPointer<LLImageFormatted> image, std::string status) +void LLTwitterConnect::twitterShareImageCoro(LLPointer<LLImageFormatted> image, std::string status) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -235,7 +235,7 @@ void LLTwitterConnect::twitterShareImageCoro(LLCoros::self& self, LLPointer<LLIm body << "\r\n--" << boundary << "--\r\n"; - LLSD result = httpAdapter->postAndYield(self, httpRequest, getTwitterConnectURL("/share/photo", true), raw, httpOpts, httpHeaders); + LLSD result = httpAdapter->postAndYield(httpRequest, getTwitterConnectURL("/share/photo", true), raw, httpOpts, httpHeaders); if (testShareStatus(result)) { @@ -247,7 +247,7 @@ void LLTwitterConnect::twitterShareImageCoro(LLCoros::self& self, LLPointer<LLIm /////////////////////////////////////////////////////////////////////////////// // -void LLTwitterConnect::twitterDisconnectCoro(LLCoros::self& self) +void LLTwitterConnect::twitterDisconnectCoro() { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -259,7 +259,7 @@ void LLTwitterConnect::twitterDisconnectCoro(LLCoros::self& self) setConnectionState(LLTwitterConnect::TWITTER_DISCONNECTING); - LLSD result = httpAdapter->deleteAndYield(self, httpRequest, getTwitterConnectURL("/connection"), httpOpts); + LLSD result = httpAdapter->deleteAndYield(httpRequest, getTwitterConnectURL("/connection"), httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -282,7 +282,7 @@ void LLTwitterConnect::twitterDisconnectCoro(LLCoros::self& self) /////////////////////////////////////////////////////////////////////////////// // -void LLTwitterConnect::twitterConnectedCoro(LLCoros::self& self, bool autoConnect) +void LLTwitterConnect::twitterConnectedCoro(bool autoConnect) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -293,7 +293,7 @@ void LLTwitterConnect::twitterConnectedCoro(LLCoros::self& self, bool autoConnec httpOpts->setFollowRedirects(false); setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_IN_PROGRESS); - LLSD result = httpAdapter->getAndYield(self, httpRequest, getTwitterConnectURL("/connection", true), httpOpts); + LLSD result = httpAdapter->getAndYield(httpRequest, getTwitterConnectURL("/connection", true), httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -331,7 +331,7 @@ void LLTwitterConnect::twitterConnectedCoro(LLCoros::self& self, bool autoConnec /////////////////////////////////////////////////////////////////////////////// // -void LLTwitterConnect::twitterInfoCoro(LLCoros::self& self) +void LLTwitterConnect::twitterInfoCoro() { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -342,7 +342,7 @@ void LLTwitterConnect::twitterInfoCoro(LLCoros::self& self) httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(false); - LLSD result = httpAdapter->getAndYield(self, httpRequest, getTwitterConnectURL("/info", true), httpOpts); + LLSD result = httpAdapter->getAndYield(httpRequest, getTwitterConnectURL("/info", true), httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -425,19 +425,19 @@ std::string LLTwitterConnect::getTwitterConnectURL(const std::string& route, boo void LLTwitterConnect::connectToTwitter(const std::string& request_token, const std::string& oauth_verifier) { LLCoros::instance().launch("LLTwitterConnect::twitterConnectCoro", - boost::bind(&LLTwitterConnect::twitterConnectCoro, this, _1, request_token, oauth_verifier)); + boost::bind(&LLTwitterConnect::twitterConnectCoro, this, request_token, oauth_verifier)); } void LLTwitterConnect::disconnectFromTwitter() { LLCoros::instance().launch("LLTwitterConnect::twitterDisconnectCoro", - boost::bind(&LLTwitterConnect::twitterDisconnectCoro, this, _1)); + boost::bind(&LLTwitterConnect::twitterDisconnectCoro, this)); } void LLTwitterConnect::checkConnectionToTwitter(bool auto_connect) { LLCoros::instance().launch("LLTwitterConnect::twitterConnectedCoro", - boost::bind(&LLTwitterConnect::twitterConnectedCoro, this, _1, auto_connect)); + boost::bind(&LLTwitterConnect::twitterConnectedCoro, this, auto_connect)); } void LLTwitterConnect::loadTwitterInfo() @@ -445,7 +445,7 @@ void LLTwitterConnect::loadTwitterInfo() if(mRefreshInfo) { LLCoros::instance().launch("LLTwitterConnect::twitterInfoCoro", - boost::bind(&LLTwitterConnect::twitterInfoCoro, this, _1)); + boost::bind(&LLTwitterConnect::twitterInfoCoro, this)); } } @@ -456,13 +456,13 @@ void LLTwitterConnect::uploadPhoto(const std::string& image_url, const std::stri body["status"] = status; LLCoros::instance().launch("LLTwitterConnect::twitterShareCoro", - boost::bind(&LLTwitterConnect::twitterShareCoro, this, _1, "/share/photo", body)); + boost::bind(&LLTwitterConnect::twitterShareCoro, this, "/share/photo", body)); } void LLTwitterConnect::uploadPhoto(LLPointer<LLImageFormatted> image, const std::string& status) { LLCoros::instance().launch("LLTwitterConnect::twitterShareImageCoro", - boost::bind(&LLTwitterConnect::twitterShareImageCoro, this, _1, image, status)); + boost::bind(&LLTwitterConnect::twitterShareImageCoro, this, image, status)); } void LLTwitterConnect::updateStatus(const std::string& status) @@ -471,7 +471,7 @@ void LLTwitterConnect::updateStatus(const std::string& status) body["status"] = status; LLCoros::instance().launch("LLTwitterConnect::twitterShareCoro", - boost::bind(&LLTwitterConnect::twitterShareCoro, this, _1, "/share/status", body)); + boost::bind(&LLTwitterConnect::twitterShareCoro, this, "/share/status", body)); } void LLTwitterConnect::storeInfo(const LLSD& info) diff --git a/indra/newview/lltwitterconnect.h b/indra/newview/lltwitterconnect.h index 4d11118143..be481a17c1 100644 --- a/indra/newview/lltwitterconnect.h +++ b/indra/newview/lltwitterconnect.h @@ -98,12 +98,12 @@ private: static boost::scoped_ptr<LLEventPump> sContentWatcher; bool testShareStatus(LLSD &result); - void twitterConnectCoro(LLCoros::self& self, std::string requestToken, std::string oauthVerifier); - void twitterDisconnectCoro(LLCoros::self& self); - void twitterConnectedCoro(LLCoros::self& self, bool autoConnect); - void twitterInfoCoro(LLCoros::self& self); - void twitterShareCoro(LLCoros::self& self, std::string route, LLSD share); - void twitterShareImageCoro(LLCoros::self& self, LLPointer<LLImageFormatted> image, std::string status); + void twitterConnectCoro(std::string requestToken, std::string oauthVerifier); + void twitterDisconnectCoro(); + void twitterConnectedCoro(bool autoConnect); + void twitterInfoCoro(); + void twitterShareCoro(std::string route, LLSD share); + void twitterShareImageCoro(LLPointer<LLImageFormatted> image, std::string status); }; #endif // LL_LLTWITTERCONNECT_H diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 04014a6ecb..f1a253a421 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -542,7 +542,7 @@ LLUUID LLBufferedAssetUploadInfo::finishUpload(LLSD &result) //========================================================================= /*static*/ -void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoros::self &self, LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, const LLUUID &id, +void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, const LLUUID &id, std::string url, NewResourceUploadInfo::ptr_t uploadInfo) { LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); @@ -567,7 +567,7 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoros::self &self, LLCore LLSD body = uploadInfo->generatePostBody(); - result = httpAdapter->postAndYield(self, httpRequest, url, body); + result = httpAdapter->postAndYield(httpRequest, url, body); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -582,7 +582,7 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoros::self &self, LLCore std::string uploader = result["uploader"].asString(); - result = httpAdapter->postFileAndYield(self, httpRequest, uploader, uploadInfo->getAssetId(), uploadInfo->getAssetType()); + result = httpAdapter->postFileAndYield(httpRequest, uploader, uploadInfo->getAssetId(), uploadInfo->getAssetType()); httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); diff --git a/indra/newview/llviewerassetupload.h b/indra/newview/llviewerassetupload.h index d44999472c..b3957c361e 100644 --- a/indra/newview/llviewerassetupload.h +++ b/indra/newview/llviewerassetupload.h @@ -193,7 +193,7 @@ class LLViewerAssetUpload { public: - static void AssetInventoryUploadCoproc(LLCoros::self &self, LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, + static void AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, const LLUUID &id, const LLUUID &id, std::string url, NewResourceUploadInfo::ptr_t uploadInfo); private: diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 6d0fce46aa..f332a4e98e 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1226,12 +1226,12 @@ void LLViewerMedia::setOpenIDCookie() std::string profileUrl = getProfileURL(""); LLCoros::instance().launch("LLViewerMedia::getOpenIDCookieCoro", - boost::bind(&LLViewerMedia::getOpenIDCookieCoro, _1, profileUrl)); + boost::bind(&LLViewerMedia::getOpenIDCookieCoro, profileUrl)); } } /*static*/ -void LLViewerMedia::getOpenIDCookieCoro(LLCoros::self& self, std::string url) +void LLViewerMedia::getOpenIDCookieCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -1280,7 +1280,7 @@ void LLViewerMedia::getOpenIDCookieCoro(LLCoros::self& self, std::string url) LL_DEBUGS("MediaAuth") << "Requesting " << url << LL_ENDL; LL_DEBUGS("MediaAuth") << "sOpenIDCookie = [" << sOpenIDCookie << "]" << LL_ENDL; - LLSD result = httpAdapter->getRawAndYield(self, httpRequest, url, httpOpts, httpHeaders); + LLSD result = httpAdapter->getRawAndYield(httpRequest, url, httpOpts, httpHeaders); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -1317,11 +1317,11 @@ void LLViewerMedia::openIDSetup(const std::string &openidUrl, const std::string LL_DEBUGS("MediaAuth") << "url = \"" << openidUrl << "\", token = \"" << openidToken << "\"" << LL_ENDL; LLCoros::instance().launch("LLViewerMedia::openIDSetupCoro", - boost::bind(&LLViewerMedia::openIDSetupCoro, _1, openidUrl, openidToken)); + boost::bind(&LLViewerMedia::openIDSetupCoro, openidUrl, openidToken)); } /*static*/ -void LLViewerMedia::openIDSetupCoro(LLCoros::self& self, std::string openidUrl, std::string openidToken) +void LLViewerMedia::openIDSetupCoro(std::string openidUrl, std::string openidToken) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -1347,7 +1347,7 @@ void LLViewerMedia::openIDSetupCoro(LLCoros::self& self, std::string openidUrl, bas << std::noskipws << openidToken; - LLSD result = httpAdapter->postRawAndYield(self, httpRequest, openidUrl, rawbody, httpOpts, httpHeaders); + LLSD result = httpAdapter->postRawAndYield(httpRequest, openidUrl, rawbody, httpOpts, httpHeaders); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -2553,7 +2553,7 @@ void LLViewerMediaImpl::navigateInternal() if(scheme.empty() || "http" == scheme || "https" == scheme) { LLCoros::instance().launch("LLViewerMediaImpl::mimeDiscoveryCoro", - boost::bind(&LLViewerMediaImpl::mimeDiscoveryCoro, this, _1, mMediaURL)); + boost::bind(&LLViewerMediaImpl::mimeDiscoveryCoro, this, mMediaURL)); } else if("data" == scheme || "file" == scheme || "about" == scheme) { @@ -2583,7 +2583,7 @@ void LLViewerMediaImpl::navigateInternal() } } -void LLViewerMediaImpl::mimeDiscoveryCoro(LLCoros::self& self, std::string url) +void LLViewerMediaImpl::mimeDiscoveryCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -2600,7 +2600,7 @@ void LLViewerMediaImpl::mimeDiscoveryCoro(LLCoros::self& self, std::string url) httpHeaders->append(HTTP_OUT_HEADER_ACCEPT, "*/*"); httpHeaders->append(HTTP_OUT_HEADER_COOKIE, ""); - LLSD result = httpAdapter->getRawAndYield(self, httpRequest, url, httpOpts, httpHeaders); + LLSD result = httpAdapter->getRawAndYield(httpRequest, url, httpOpts, httpHeaders); mMimeProbe.reset(); diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index ff9840627c..92d644c900 100755 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -170,8 +170,8 @@ private: static void setOpenIDCookie(); static void onTeleportFinished(); - static void openIDSetupCoro(LLCoros::self& self, std::string openidUrl, std::string openidToken); - static void getOpenIDCookieCoro(LLCoros::self& self, std::string url); + static void openIDSetupCoro(std::string openidUrl, std::string openidToken); + static void getOpenIDCookieCoro(std::string url); static LLPluginCookieStore *sCookieStore; static LLURL sOpenIDURL; @@ -475,7 +475,7 @@ private: BOOL mIsUpdated ; std::list< LLVOVolume* > mObjectList ; - void mimeDiscoveryCoro(LLCoros::self& self, std::string url); + void mimeDiscoveryCoro(std::string url); LLCoreHttpUtil::HttpCoroutineAdapter::wptr_t mMimeProbe; bool mCanceling; diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index e086ee9180..9c4045fa1e 100755 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -792,7 +792,7 @@ void upload_new_resource( if ( !url.empty() ) { - LLCoprocedureManager::CoProcedure_t proc = boost::bind(&LLViewerAssetUpload::AssetInventoryUploadCoproc, _1, _2, _3, url, uploadInfo); + LLCoprocedureManager::CoProcedure_t proc = boost::bind(&LLViewerAssetUpload::AssetInventoryUploadCoproc, _1, _2, url, uploadInfo); LLCoprocedureManager::getInstance()->enqueueCoprocedure("LLViewerAssetUpload::AssetInventoryUploadCoproc", proc); } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 1c3e2aec01..2a009499d3 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -992,7 +992,7 @@ void LLViewerObjectList::fetchObjectCosts() if (!url.empty()) { LLCoros::instance().launch("LLViewerObjectList::fetchObjectCostsCoro", - boost::bind(&LLViewerObjectList::fetchObjectCostsCoro, this, _1, url)); + boost::bind(&LLViewerObjectList::fetchObjectCostsCoro, this, url)); } else { @@ -1014,7 +1014,7 @@ void LLViewerObjectList::reportObjectCostFailure(LLSD &objectList) } -void LLViewerObjectList::fetchObjectCostsCoro(LLCoros::self& self, std::string url) +void LLViewerObjectList::fetchObjectCostsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -1052,7 +1052,7 @@ void LLViewerObjectList::fetchObjectCostsCoro(LLCoros::self& self, std::string u postData["object_ids"] = idList; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, postData); + LLSD result = httpAdapter->postAndYield(httpRequest, url, postData); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -1122,7 +1122,7 @@ void LLViewerObjectList::fetchPhysicsFlags() if (!url.empty()) { LLCoros::instance().launch("LLViewerObjectList::fetchPhisicsFlagsCoro", - boost::bind(&LLViewerObjectList::fetchPhisicsFlagsCoro, this, _1, url)); + boost::bind(&LLViewerObjectList::fetchPhisicsFlagsCoro, this, url)); } else { @@ -1143,7 +1143,7 @@ void LLViewerObjectList::reportPhysicsFlagFailure(LLSD &objectList) } } -void LLViewerObjectList::fetchPhisicsFlagsCoro(LLCoros::self& self, std::string url) +void LLViewerObjectList::fetchPhisicsFlagsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -1181,7 +1181,7 @@ void LLViewerObjectList::fetchPhisicsFlagsCoro(LLCoros::self& self, std::string postData["object_ids"] = idList; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, postData); + LLSD result = httpAdapter->postAndYield(httpRequest, url, postData); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index f849813f0a..9ec7c4bc22 100755 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -232,10 +232,10 @@ protected: private: static void reportObjectCostFailure(LLSD &objectList); - void fetchObjectCostsCoro(LLCoros::self& self, std::string url); + void fetchObjectCostsCoro(std::string url); static void reportPhysicsFlagFailure(LLSD &obejectList); - void fetchPhisicsFlagsCoro(LLCoros::self& self, std::string url); + void fetchPhisicsFlagsCoro(std::string url); }; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index f0015ceef1..291af28bc3 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -219,12 +219,12 @@ public: LLVector3 mLastCameraOrigin; U32 mLastCameraUpdate; - void requestBaseCapabilitiesCoro(LLCoros::self& self, U64 regionHandle); - void requestBaseCapabilitiesCompleteCoro(LLCoros::self& self, U64 regionHandle); - void requestSimulatorFeatureCoro(LLCoros::self& self, std::string url, U64 regionHandle); + void requestBaseCapabilitiesCoro(U64 regionHandle); + void requestBaseCapabilitiesCompleteCoro(U64 regionHandle); + void requestSimulatorFeatureCoro(std::string url, U64 regionHandle); }; -void LLViewerRegionImpl::requestBaseCapabilitiesCoro(LLCoros::self& self, U64 regionHandle) +void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -275,7 +275,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(LLCoros::self& self, U64 re << " (attempt #" << mSeedCapAttempts << ")" << LL_ENDL; regionp = NULL; - result = httpAdapter->postAndYield(self, httpRequest, url, capabilityNames); + result = httpAdapter->postAndYield(httpRequest, url, capabilityNames); regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle); if (!regionp) //region was removed @@ -332,7 +332,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(LLCoros::self& self, U64 re } -void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(LLCoros::self& self, U64 regionHandle) +void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(U64 regionHandle) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -365,7 +365,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(LLCoros::self& self LL_INFOS("AppInit", "Capabilities") << "Requesting second Seed from " << url << LL_ENDL; regionp = NULL; - result = httpAdapter->postAndYield(self, httpRequest, url, capabilityNames); + result = httpAdapter->postAndYield(httpRequest, url, capabilityNames); LLSD httpResults = result["http_result"]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -435,7 +435,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(LLCoros::self& self } -void LLViewerRegionImpl::requestSimulatorFeatureCoro(LLCoros::self& self, std::string url, U64 regionHandle) +void LLViewerRegionImpl::requestSimulatorFeatureCoro(std::string url, U64 regionHandle) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -464,7 +464,7 @@ void LLViewerRegionImpl::requestSimulatorFeatureCoro(LLCoros::self& self, std::s } regionp = NULL; - LLSD result = httpAdapter->getAndYield(self, httpRequest, url); + LLSD result = httpAdapter->getAndYield(httpRequest, url); LLSD httpResults = result["http_result"]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -2908,7 +2908,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) //to the "original" seed cap received and determine why there is problem! std::string coroname = LLCoros::instance().launch("LLEnvironmentRequest::requestBaseCapabilitiesCompleteCoro", - boost::bind(&LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro, mImpl, _1, getHandle())); + boost::bind(&LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro, mImpl, getHandle())); return; } @@ -2919,8 +2919,8 @@ void LLViewerRegion::setSeedCapability(const std::string& url) setCapability("Seed", url); std::string coroname = - LLCoros::instance().launch("LLEnvironmentRequest::environmentRequestCoro", - boost::bind(&LLViewerRegionImpl::requestBaseCapabilitiesCoro, mImpl, _1, getHandle())); + LLCoros::instance().launch("LLViewerRegionImpl::requestBaseCapabilitiesCoro", + boost::bind(&LLViewerRegionImpl::requestBaseCapabilitiesCoro, mImpl, getHandle())); LL_INFOS("AppInit", "Capabilities") << "Launching " << coroname << " requesting seed capabilities from " << url << LL_ENDL; } @@ -2947,7 +2947,7 @@ void LLViewerRegion::setCapability(const std::string& name, const std::string& u // kick off a request for simulator features std::string coroname = LLCoros::instance().launch("LLViewerRegionImpl::requestSimulatorFeatureCoro", - boost::bind(&LLViewerRegionImpl::requestSimulatorFeatureCoro, mImpl, _1, url, getHandle())); + boost::bind(&LLViewerRegionImpl::requestSimulatorFeatureCoro, mImpl, url, getHandle())); LL_INFOS("AppInit", "SimulatorFeatures") << "Launching " << coroname << " requesting simulator features from " << url << LL_ENDL; } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index ba4fd59feb..7c460ce097 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2190,7 +2190,7 @@ const std::string LLVOAvatarSelf::debugDumpAllLocalTextureDataInfo() const return text; } -void LLVOAvatarSelf::appearanceChangeMetricsCoro(LLCoros::self& self, std::string url) +void LLVOAvatarSelf::appearanceChangeMetricsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -2242,7 +2242,7 @@ void LLVOAvatarSelf::appearanceChangeMetricsCoro(LLCoros::self& self, std::strin gPendingMetricsUploads++; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, msg); + LLSD result = httpAdapter->postAndYield(httpRequest, url, msg); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -2347,7 +2347,7 @@ void LLVOAvatarSelf::sendViewerAppearanceChangeMetrics() { LLCoros::instance().launch("LLVOAvatarSelf::appearanceChangeMetricsCoro", - boost::bind(&LLVOAvatarSelf::appearanceChangeMetricsCoro, this, _1, caps_url)); + boost::bind(&LLVOAvatarSelf::appearanceChangeMetricsCoro, this, caps_url)); mTimeSinceLastRezMessage.reset(); } } diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index b3b5fe6c2f..d32c959fb5 100755 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -402,7 +402,7 @@ private: F32 mDebugBakedTextureTimes[LLAvatarAppearanceDefines::BAKED_NUM_INDICES][2]; // time to start upload and finish upload of each baked texture void debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); - void appearanceChangeMetricsCoro(LLCoros::self& self, std::string url); + void appearanceChangeMetricsCoro(std::string url); bool mInitialMetric; S32 mMetricSequence; /** Diagnostics diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 338201aab1..192d50ae9b 100755 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -481,7 +481,7 @@ void LLVoiceChannelGroup::getChannelInfo() std::string url = region->getCapability("ChatSessionRequest"); LLCoros::instance().launch("LLVoiceChannelGroup::voiceCallCapCoro", - boost::bind(&LLVoiceChannelGroup::voiceCallCapCoro, this, _1, url)); + boost::bind(&LLVoiceChannelGroup::voiceCallCapCoro, this, url)); } } @@ -604,7 +604,7 @@ void LLVoiceChannelGroup::setState(EState state) } } -void LLVoiceChannelGroup::voiceCallCapCoro(LLCoros::self& self, std::string url) +void LLVoiceChannelGroup::voiceCallCapCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -617,7 +617,7 @@ void LLVoiceChannelGroup::voiceCallCapCoro(LLCoros::self& self, std::string url) LL_INFOS("Voice", "voiceCallCapCoro") << "Generic POST for " << url << LL_ENDL; - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, postData); + LLSD result = httpAdapter->postAndYield(httpRequest, url, postData); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 0dac0b1f6a..ef15b2c79e 100755 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -159,7 +159,7 @@ protected: virtual void setState(EState state); private: - void voiceCallCapCoro(LLCoros::self& self, std::string url); + void voiceCallCapCoro(std::string url); U32 mRetries; BOOL mIsRetrying; diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index c70ce5801d..f50ffdeae7 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -446,13 +446,13 @@ void LLVivoxVoiceClient::requestVoiceAccountProvision(S32 retries) if ( !url.empty() ) { LLCoros::instance().launch("LLVivoxVoiceClient::voiceAccountProvisionCoro", - boost::bind(&LLVivoxVoiceClient::voiceAccountProvisionCoro, this, _1, url, retries)); + boost::bind(&LLVivoxVoiceClient::voiceAccountProvisionCoro, this, url, retries)); setState(stateConnectorStart); } } } -void LLVivoxVoiceClient::voiceAccountProvisionCoro(LLCoros::self& self, std::string url, S32 retries) +void LLVivoxVoiceClient::voiceAccountProvisionCoro(std::string url, S32 retries) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -462,7 +462,7 @@ void LLVivoxVoiceClient::voiceAccountProvisionCoro(LLCoros::self& self, std::str httpOpts->setRetries(retries); - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, LLSD(), httpOpts); + LLSD result = httpAdapter->postAndYield(httpRequest, url, LLSD(), httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -3928,12 +3928,12 @@ bool LLVivoxVoiceClient::requestParcelVoiceInfo() LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL; LLCoros::instance().launch("LLVivoxVoiceClient::parcelVoiceInfoRequestCoro", - boost::bind(&LLVivoxVoiceClient::parcelVoiceInfoRequestCoro, this, _1, url)); + boost::bind(&LLVivoxVoiceClient::parcelVoiceInfoRequestCoro, this, url)); return true; } } -void LLVivoxVoiceClient::parcelVoiceInfoRequestCoro(LLCoros::self& self, std::string url) +void LLVivoxVoiceClient::parcelVoiceInfoRequestCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -3941,7 +3941,7 @@ void LLVivoxVoiceClient::parcelVoiceInfoRequestCoro(LLCoros::self& self, std::st LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); state requestingState = getState(); - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, LLSD()); + LLSD result = httpAdapter->postAndYield(httpRequest, url, LLSD()); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index a3cdb342e2..b12ed80e41 100755 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -637,8 +637,8 @@ protected: private: - void voiceAccountProvisionCoro(LLCoros::self& self, std::string url, S32 retries); - void parcelVoiceInfoRequestCoro(LLCoros::self& self, std::string url); + void voiceAccountProvisionCoro(std::string url, S32 retries); + void parcelVoiceInfoRequestCoro(std::string url); LLVoiceVersionInfo mVoiceVersion; diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp index 62ba40ca32..2033a5f36a 100755 --- a/indra/newview/llwebprofile.cpp +++ b/indra/newview/llwebprofile.cpp @@ -67,7 +67,7 @@ LLWebProfile::status_callback_t LLWebProfile::mStatusCallback; void LLWebProfile::uploadImage(LLPointer<LLImageFormatted> image, const std::string& caption, bool add_location) { LLCoros::instance().launch("LLWebProfile::uploadImageCoro", - boost::bind(&LLWebProfile::uploadImageCoro, _1, image, caption, add_location)); + boost::bind(&LLWebProfile::uploadImageCoro, image, caption, add_location)); } @@ -95,7 +95,7 @@ LLCore::HttpHeaders::ptr_t LLWebProfile::buildDefaultHeaders() /*static*/ -void LLWebProfile::uploadImageCoro(LLCoros::self& self, LLPointer<LLImageFormatted> image, std::string caption, bool addLocation) +void LLWebProfile::uploadImageCoro(LLPointer<LLImageFormatted> image, std::string caption, bool addLocation) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -124,7 +124,7 @@ void LLWebProfile::uploadImageCoro(LLCoros::self& self, LLPointer<LLImageFormatt httpHeaders = buildDefaultHeaders(); httpHeaders->append(HTTP_OUT_HEADER_COOKIE, getAuthCookie()); - LLSD result = httpAdapter->getJsonAndYield(self, httpRequest, configUrl, httpOpts, httpHeaders); + LLSD result = httpAdapter->getJsonAndYield(httpRequest, configUrl, httpOpts, httpHeaders); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -150,7 +150,7 @@ void LLWebProfile::uploadImageCoro(LLCoros::self& self, LLPointer<LLImageFormatt LLCore::BufferArray::ptr_t body = LLWebProfile::buildPostData(data, image, boundary); - result = httpAdapter->postAndYield(self, httpRequest, uploadUrl, body, httpOpts, httpHeaders); + result = httpAdapter->postAndYield(httpRequest, uploadUrl, body, httpOpts, httpHeaders); body.reset(); httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; @@ -178,7 +178,7 @@ void LLWebProfile::uploadImageCoro(LLCoros::self& self, LLPointer<LLImageFormatt LL_DEBUGS("Snapshots") << "Got redirection URL: " << redirUrl << LL_ENDL; - result = httpAdapter->getRawAndYield(self, httpRequest, redirUrl, httpOpts, httpHeaders); + result = httpAdapter->getRawAndYield(httpRequest, redirUrl, httpOpts, httpHeaders); httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); diff --git a/indra/newview/llwebprofile.h b/indra/newview/llwebprofile.h index 604ef7aff7..6227e00afe 100755 --- a/indra/newview/llwebprofile.h +++ b/indra/newview/llwebprofile.h @@ -60,7 +60,7 @@ public: private: static LLCore::HttpHeaders::ptr_t buildDefaultHeaders(); - static void uploadImageCoro(LLCoros::self& self, LLPointer<LLImageFormatted> image, std::string caption, bool add_location); + static void uploadImageCoro(LLPointer<LLImageFormatted> image, std::string caption, bool add_location); static LLCore::BufferArray::ptr_t buildPostData(const LLSD &data, LLPointer<LLImageFormatted> &image, const std::string &boundary); static void reportImageUploadStatus(bool ok); diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp index 3145c3f38d..ff15afa598 100755 --- a/indra/newview/llwlhandlers.cpp +++ b/indra/newview/llwlhandlers.cpp @@ -84,7 +84,7 @@ bool LLEnvironmentRequest::doRequest() std::string coroname = LLCoros::instance().launch("LLEnvironmentRequest::environmentRequestCoro", - boost::bind(&LLEnvironmentRequest::environmentRequestCoro, _1, url)); + boost::bind(&LLEnvironmentRequest::environmentRequestCoro, url)); LL_INFOS("WindlightCaps") << "Requesting region windlight settings via " << url << LL_ENDL; return true; @@ -93,7 +93,7 @@ bool LLEnvironmentRequest::doRequest() S32 LLEnvironmentRequest::sLastRequest = 0; //static -void LLEnvironmentRequest::environmentRequestCoro(LLCoros::self& self, std::string url) +void LLEnvironmentRequest::environmentRequestCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); S32 requestId = ++LLEnvironmentRequest::sLastRequest; @@ -101,7 +101,7 @@ void LLEnvironmentRequest::environmentRequestCoro(LLCoros::self& self, std::stri httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EnvironmentRequest", httpPolicy)); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLSD result = httpAdapter->getAndYield(self, httpRequest, url); + LLSD result = httpAdapter->getAndYield(httpRequest, url); if (requestId != LLEnvironmentRequest::sLastRequest) { @@ -174,18 +174,18 @@ bool LLEnvironmentApply::initiateRequest(const LLSD& content) std::string coroname = LLCoros::instance().launch("LLEnvironmentApply::environmentApplyCoro", - boost::bind(&LLEnvironmentApply::environmentApplyCoro, _1, url, content)); + boost::bind(&LLEnvironmentApply::environmentApplyCoro, url, content)); return true; } -void LLEnvironmentApply::environmentApplyCoro(LLCoros::self& self, std::string url, LLSD content) +void LLEnvironmentApply::environmentApplyCoro(std::string url, LLSD content) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EnvironmentApply", httpPolicy)); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLSD result = httpAdapter->postAndYield(self, httpRequest, url, content); + LLSD result = httpAdapter->postAndYield(httpRequest, url, content); LLSD notify; // for error reporting. If there is something to report to user this will be defined. /* diff --git a/indra/newview/llwlhandlers.h b/indra/newview/llwlhandlers.h index 0b778901ad..eb2bbf9553 100755 --- a/indra/newview/llwlhandlers.h +++ b/indra/newview/llwlhandlers.h @@ -41,7 +41,7 @@ private: static void onRegionCapsReceived(const LLUUID& region_id); static bool doRequest(); - static void environmentRequestCoro(LLCoros::self& self, std::string url); + static void environmentRequestCoro(std::string url); static S32 sLastRequest; }; @@ -57,7 +57,7 @@ private: static clock_t sLastUpdate; static clock_t UPDATE_WAIT_SECONDS; - static void environmentApplyCoro(LLCoros::self& self, std::string url, LLSD content); + static void environmentApplyCoro(std::string url, LLSD content); }; #endif // LL_LLWLHANDLERS_H diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index b8408a6fb4..88415ff11a 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 = llcoro::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")); + llcoro::postAndWait(request, xmlrpcPump, loginReplyPump, "reply")); mAuthResponse["status"].asString() == "Downloading"; mAuthResponse = validateResponse(loginReplyPump.getName(), - waitForEventOn(self, loginReplyPump))) + llcoro::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); }; |