diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-07-16 06:48:11 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-07-16 06:48:11 +0000 |
commit | 574ccee478b9da9457cdf0e476b8df6eb584b580 (patch) | |
tree | 5a8166f47057ed322294db7816e2732d1d18f7bc /sca-cpp/trunk/components/chat/xmpp.hpp | |
parent | 419f903ff44a22debba43976baae1e86c1e5d871 (diff) |
Minor memory management, performance, and tracing improvements.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1361917 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/components/chat/xmpp.hpp')
-rw-r--r-- | sca-cpp/trunk/components/chat/xmpp.hpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sca-cpp/trunk/components/chat/xmpp.hpp b/sca-cpp/trunk/components/chat/xmpp.hpp index e5f423c270..aa006029fa 100644 --- a/sca-cpp/trunk/components/chat/xmpp.hpp +++ b/sca-cpp/trunk/components/chat/xmpp.hpp @@ -76,6 +76,20 @@ public: debug("chat::xmppclient::copy"); } + const XMPPClient& operator=(const XMPPClient& xc) { + debug("chat::xmppclient::operator="); + if(this == &xc) + return *this; + owner = false; + ctx = xc.ctx; + conn = xc.conn; + listener = xc.listener; + connecting = xc.connecting; + connected = xc.connected; + disconnecting = xc.disconnecting; + return *this; + } + ~XMPPClient() { debug("chat::~xmppclient"); extern const failable<bool> disconnect(XMPPClient& xc); @@ -98,7 +112,7 @@ private: friend const failable<bool> disconnect(XMPPClient& xc); friend const failable<bool> listen(const lambda<failable<bool>(const value&, const value&, XMPPClient&)>& listener, XMPPClient& xc); - const bool owner; + bool owner; xmpp_ctx_t* ctx; xmpp_conn_t* conn; lambda<failable<bool>(const value&, const value&, XMPPClient&)> listener; |