diff options
| -rwxr-xr-x | indra/llcommon/lleventcoro.cpp | 18 | ||||
| -rwxr-xr-x | indra/llcommon/lleventcoro.h | 22 | ||||
| -rwxr-xr-x | indra/llcommon/tests/lleventcoro_test.cpp | 8 | ||||
| -rwxr-xr-x | indra/viewer_components/login/lllogin.cpp | 6 | 
4 files changed, 27 insertions, 27 deletions
| diff --git a/indra/llcommon/lleventcoro.cpp b/indra/llcommon/lleventcoro.cpp index 031c2cffb0..c9bfcacedc 100755 --- a/indra/llcommon/lleventcoro.cpp +++ b/indra/llcommon/lleventcoro.cpp @@ -73,7 +73,7 @@ std::string listenerNameForCoro()  }  /** - * Implement behavior described for postEventAndSuspend()'s @a replyPumpNamePath + * Implement behavior described for postAndSuspend()'s @a replyPumpNamePath   * parameter:   *   * * If <tt>path.isUndefined()</tt>, do nothing. @@ -153,7 +153,7 @@ void llcoro::suspend()      suspendUntilEventOn("mainloop");  } -LLSD llcoro::postEventAndSuspend(const LLSD& event, const LLEventPumpOrPumpName& requestPump, +LLSD llcoro::postAndSuspend(const LLSD& event, const LLEventPumpOrPumpName& requestPump,                   const LLEventPumpOrPumpName& replyPump, const LLSD& replyPumpNamePath)  {      // declare the future @@ -171,7 +171,7 @@ LLSD llcoro::postEventAndSuspend(const LLSD& event, const LLEventPumpOrPumpName&          // request event.          LLSD modevent(event);          storeToLLSDPath(modevent, replyPumpNamePath, replyPump.getPump().getName()); -        LL_DEBUGS("lleventcoro") << "postEventAndSuspend(): coroutine " << listenerName +        LL_DEBUGS("lleventcoro") << "postAndSuspend(): coroutine " << listenerName                                   << " posting to " << requestPump.getPump().getName()                                   << LL_ENDL; @@ -179,7 +179,7 @@ LLSD llcoro::postEventAndSuspend(const LLSD& event, const LLEventPumpOrPumpName&          //                         << ": " << modevent << LL_ENDL;          requestPump.getPump().post(modevent);      } -    LL_DEBUGS("lleventcoro") << "postEventAndSuspend(): coroutine " << listenerName +    LL_DEBUGS("lleventcoro") << "postAndSuspend(): coroutine " << listenerName                               << " about to wait on LLEventPump " << replyPump.getPump().getName()                               << LL_ENDL;      // trying to dereference ("resolve") the future makes us wait for it @@ -189,7 +189,7 @@ LLSD llcoro::postEventAndSuspend(const LLSD& event, const LLEventPumpOrPumpName&          llcoro::Suspending suspended;          value = *future;      } // destroy Suspending as soon as we're back -    LL_DEBUGS("lleventcoro") << "postEventAndSuspend(): coroutine " << listenerName +    LL_DEBUGS("lleventcoro") << "postAndSuspend(): coroutine " << listenerName                               << " resuming with " << value << LL_ENDL;      // returning should disconnect the connection      return value; @@ -242,7 +242,7 @@ WaitForEventOnHelper<LISTENER> wfeoh(const LISTENER& listener, int discriminator  namespace llcoro  { -LLEventWithID postEventAndSuspend2(const LLSD& event, +LLEventWithID postAndSuspend2(const LLSD& event,                             const LLEventPumpOrPumpName& requestPump,                             const LLEventPumpOrPumpName& replyPump0,                             const LLEventPumpOrPumpName& replyPump1, @@ -270,12 +270,12 @@ LLEventWithID postEventAndSuspend2(const LLSD& event,                          replyPump0.getPump().getName());          storeToLLSDPath(modevent, replyPump1NamePath,                          replyPump1.getPump().getName()); -        LL_DEBUGS("lleventcoro") << "postEventAndSuspend2(): coroutine " << name +        LL_DEBUGS("lleventcoro") << "postAndSuspend2(): coroutine " << name                                   << " posting to " << requestPump.getPump().getName()                                   << ": " << modevent << LL_ENDL;          requestPump.getPump().post(modevent);      } -    LL_DEBUGS("lleventcoro") << "postEventAndSuspend2(): coroutine " << name +    LL_DEBUGS("lleventcoro") << "postAndSuspend2(): 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 @@ -285,7 +285,7 @@ LLEventWithID postEventAndSuspend2(const LLSD& event,          llcoro::Suspending suspended;          value = *future;      } // destroy Suspending as soon as we're back -    LL_DEBUGS("lleventcoro") << "postEventAndSuspend(): coroutine " << name +    LL_DEBUGS("lleventcoro") << "postAndSuspend(): coroutine " << name                               << " resuming with (" << value.first << ", " << value.second << ")"                               << LL_ENDL;      // returning should disconnect both connections diff --git a/indra/llcommon/lleventcoro.h b/indra/llcommon/lleventcoro.h index a09759c9cf..6fda3d2572 100755 --- a/indra/llcommon/lleventcoro.h +++ b/indra/llcommon/lleventcoro.h @@ -123,14 +123,14 @@ void suspend();   * entered. Therefore, the coroutine completely misses an immediate reply   * event, making it suspend indefinitely.   * - * By contrast, postEventAndSuspend() listens on the @a replyPump @em before posting + * By contrast, postAndSuspend() listens on the @a replyPump @em before posting   * the specified LLSD event on the specified @a requestPump.   *   * @param event LLSD data to be posted on @a requestPump   * @param requestPump an LLEventPump on which to post @a event. Pass either   * the LLEventPump& or its string name. However, if you pass a   * default-constructed @c LLEventPumpOrPumpName, we skip the post() call. - * @param replyPump an LLEventPump on which postEventAndSuspend() will listen for a + * @param replyPump an LLEventPump on which postAndSuspend() will listen for a   * reply. Pass either the LLEventPump& or its string name. The calling   * coroutine will suspend until that reply arrives. (If you're concerned about a   * reply that might not arrive, please see also LLEventTimeout.) @@ -155,7 +155,7 @@ void suspend();   *   @a replyPumpNamePath specifies the entry in the lowest-level structure in   *   @a event into which to store <tt>replyPump.getName()</tt>.   */ -LLSD postEventAndSuspend(const LLSD& event, const LLEventPumpOrPumpName& requestPump, +LLSD postAndSuspend(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 @@ -163,8 +163,8 @@ LLSD postEventAndSuspend(const LLSD& event, const LLEventPumpOrPumpName& request  inline  LLSD suspendUntilEventOn(const LLEventPumpOrPumpName& pump)  { -    // This is now a convenience wrapper for postEventAndSuspend(). -    return postEventAndSuspend(LLSD(), LLEventPumpOrPumpName(), pump); +    // This is now a convenience wrapper for postAndSuspend(). +    return postAndSuspend(LLSD(), LLEventPumpOrPumpName(), pump);  }  } // namespace llcoro @@ -201,10 +201,10 @@ namespace llcoro   * the single-pump function) or LLEventOrPumpName (@a replyPump1 for two-pump   * function).   * - * It seems less burdensome to write postEventAndSuspend2() than to write either + * It seems less burdensome to write postAndSuspend2() than to write either   * LLSD("someString") or LLEventOrPumpName("someString").   */ -LLEventWithID postEventAndSuspend2(const LLSD& event, +LLEventWithID postAndSuspend2(const LLSD& event,                             const LLEventPumpOrPumpName& requestPump,                             const LLEventPumpOrPumpName& replyPump0,                             const LLEventPumpOrPumpName& replyPump1, @@ -218,8 +218,8 @@ inline  LLEventWithID  suspendUntilEventOn(const LLEventPumpOrPumpName& pump0, const LLEventPumpOrPumpName& pump1)  { -    // This is now a convenience wrapper for postEventAndSuspend2(). -    return postEventAndSuspend2(LLSD(), LLEventPumpOrPumpName(), pump0, pump1); +    // This is now a convenience wrapper for postAndSuspend2(). +    return postAndSuspend2(LLSD(), LLEventPumpOrPumpName(), pump0, pump1);  }  /** @@ -312,7 +312,7 @@ public:      LLSD postAndSuspend(const LLSD& event, const LLEventPumpOrPumpName& requestPump,                       const LLSD& replyPumpNamePath=LLSD())      { -        return llcoro::postEventAndSuspend(event, requestPump, mPump, replyPumpNamePath); +        return llcoro::postAndSuspend(event, requestPump, mPump, replyPumpNamePath);      }  private: @@ -371,7 +371,7 @@ public:                                const LLSD& replyPump0NamePath=LLSD(),                                const LLSD& replyPump1NamePath=LLSD())      { -        return llcoro::postEventAndSuspend2(event, requestPump, mPump0, mPump1, +        return llcoro::postAndSuspend2(event, requestPump, mPump0, mPump1,                                      replyPump0NamePath, replyPump1NamePath);      } diff --git a/indra/llcommon/tests/lleventcoro_test.cpp b/indra/llcommon/tests/lleventcoro_test.cpp index 5cced69670..1ee79e9eb6 100755 --- a/indra/llcommon/tests/lleventcoro_test.cpp +++ b/indra/llcommon/tests/lleventcoro_test.cpp @@ -129,7 +129,7 @@ typedef coroutine<std::string::iterator(void)> match_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 postEventAndSuspend() from calling post(), then calling +/// distinguishes postAndSuspend() from calling post(), then calling  /// suspendUntilEventOn().  class ImmediateAPI  { @@ -532,7 +532,7 @@ namespace tut      {          BEGIN          { -            result = postEventAndSuspend(LLSDMap("value", 17),       // request event +            result = postAndSuspend(LLSDMap("value", 17),       // request event                                   immediateAPI.getPump(),     // requestPump                                   "reply1",                   // replyPump                                   "reply");                   // request["reply"] = name @@ -554,7 +554,7 @@ namespace tut      {          BEGIN          { -            LLEventWithID pair = ::postEventAndSuspend2(LLSDMap("value", 18), +            LLEventWithID pair = ::postAndSuspend2(LLSDMap("value", 18),                                                  immediateAPI.getPump(),                                                  "reply2",                                                  "error2", @@ -582,7 +582,7 @@ namespace tut      {          BEGIN          { -            LLEventWithID pair = ::postEventAndSuspend2(LLSDMap("value", 18)("fail", LLSD()), +            LLEventWithID pair = ::postAndSuspend2(LLSDMap("value", 18)("fail", LLSD()),                                                  immediateAPI.getPump(),                                                  "reply2",                                                  "error2", diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 1feb41faf6..ad3d84b8e5 100755 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -175,7 +175,7 @@ void LLLogin::Impl::login_(std::string uri, LLSD login_params)  		request["op"] = "rewriteURI";  		request["uri"] = uri;  		request["reply"] = replyPump.getName(); -		rewrittenURIs = llcoro::postEventAndSuspend(request, srv_pump_name, filter); +		rewrittenURIs = llcoro::postAndSuspend(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 @@ -215,13 +215,13 @@ void LLLogin::Impl::login_(std::string uri, LLSD login_params)              sendProgressEvent("offline", "authenticating", progress_data);              // We expect zero or more "Downloading" status events, followed by -            // exactly one event with some other status. Use postEventAndSuspend() the +            // exactly one event with some other status. Use postAndSuspend() the              // first time, because -- at least in unit-test land -- it's              // possible for the reply to arrive before the post() call              // returns. Subsequent responses, of course, must be awaited              // without posting again.              for (mAuthResponse = validateResponse(loginReplyPump.getName(), -                     llcoro::postEventAndSuspend(request, xmlrpcPump, loginReplyPump, "reply")); +                     llcoro::postAndSuspend(request, xmlrpcPump, loginReplyPump, "reply"));                   mAuthResponse["status"].asString() == "Downloading";                   mAuthResponse = validateResponse(loginReplyPump.getName(),                                                    llcoro::suspendUntilEventOn(loginReplyPump))) | 
