summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Litovchuk <slitovchuk@productengine.com>2009-11-24 22:38:32 +0200
committerSergei Litovchuk <slitovchuk@productengine.com>2009-11-24 22:38:32 +0200
commit11a9fe3e7c10fddee6bcf4294e852f6ae389e3d6 (patch)
tree200aded5689dfdcf86bb9b6728a97c7ec8433356
parent04cf3fefca230f4f2c351dddebb36e691a9f7bc5 (diff)
Fixed critical EXT-2469 "Viewer crashes in the Floater Call".
- Replaced a boost::function in VoiceChannel by a boost::signal connection for calling VoiceChannel state change callback. --HG-- branch : product-engine
-rw-r--r--indra/newview/llvoicechannel.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index 639585de55..a3495b9588 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -52,7 +52,7 @@ public:
STATE_CONNECTED
} EState;
- typedef boost::function<void(const EState& old_state, const EState& new_state)> state_changed_callback_t;
+ typedef boost::signals2::signal<void(const EState& old_state, const EState& new_state)> state_changed_signal_t;
// on current channel changed signal
typedef boost::function<void(const LLUUID& session_id)> channel_changed_callback_t;
@@ -78,7 +78,8 @@ public:
virtual BOOL callStarted();
const std::string& getSessionName() const { return mSessionName; }
- void setStateChangedCallback(state_changed_callback_t callback) { mStateChangedCallback = callback; }
+ boost::signals2::connection setStateChangedCallback(const state_changed_signal_t::slot_type& callback)
+ { return mStateChangedCallback.connect(callback); }
const LLUUID getSessionID() { return mSessionID; }
EState getState() { return mState; }
@@ -124,7 +125,7 @@ protected:
static BOOL sSuspended;
private:
- state_changed_callback_t mStateChangedCallback;
+ state_changed_signal_t mStateChangedCallback;
};
class LLVoiceChannelGroup : public LLVoiceChannel