diff options
| -rw-r--r-- | indra/llcommon/llevents.cpp | 9 | ||||
| -rw-r--r-- | indra/llcommon/llevents.h | 3 | ||||
| -rw-r--r-- | indra/newview/llvoicevivox.cpp | 2 | 
3 files changed, 10 insertions, 4 deletions
| diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp index 99abb333bb..186e710c43 100644 --- a/indra/llcommon/llevents.cpp +++ b/indra/llcommon/llevents.cpp @@ -602,6 +602,11 @@ LLBoundListener LLEventMailDrop::listen_impl(const std::string& name,      return LLEventStream::listen_impl(name, listener, after, before);  } +void LLEventMailDrop::discard() +{ +    mEventHistory.clear(); +    LLEventStream::flush(); +}  /*****************************************************************************  *   LLEventQueue @@ -621,8 +626,8 @@ bool LLEventQueue::post(const LLSD& event)  void LLEventQueue::flush()  { -	if(!mSignal) return; -		 +    if(!mSignal) return; +      // Consider the case when a given listener on this LLEventQueue posts yet      // another event on the same queue. If we loop over mEventQueue directly,      // we'll end up processing all those events during the same flush() call diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h index 3c388bf176..ce2aa2f3c9 100644 --- a/indra/llcommon/llevents.h +++ b/indra/llcommon/llevents.h @@ -610,7 +610,8 @@ public:      virtual bool post(const LLSD& event) override;      /// Remove any history stored in the mail drop. -    virtual void flush() override { mEventHistory.clear(); LLEventStream::flush(); }; +    void discard(); +  protected:      virtual LLBoundListener listen_impl(const std::string& name, const LLEventListener&,                                          const NameList& after, diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 7d9085a214..1141b29163 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -1488,7 +1488,7 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession)      // We are about to start a whole new session.  Anything that MIGHT still be in our       // maildrop is going to be stale and cause us much wailing and gnashing of teeth.        // Just flush it all out and start new. -    mVivoxPump.flush(); +    mVivoxPump.discard();      // It appears that I need to wait for BOTH the SessionGroup.AddSession response and the SessionStateChangeEvent with state 4      // before continuing from this state.  They can happen in either order, and if I don't wait for both, things can get stuck. | 
