diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-06-18 21:17:26 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-06-18 21:27:59 (GMT) |
commit | 154bf14ac15fc7bff918c20814b29b5cc3bc5ba4 (patch) | |
tree | 28f18493bb6bc1cbf85b90f391daa6c4e1ecb3aa /Swiften/Examples | |
parent | b763087e13f25e08aa51a6568b03727f136de34e (diff) | |
download | swift-154bf14ac15fc7bff918c20814b29b5cc3bc5ba4.zip swift-154bf14ac15fc7bff918c20814b29b5cc3bc5ba4.tar.bz2 |
Fix crash on reconnect.
BoostTimer isn't supposed to be constructed as a non-shared-ptr. Making
constructor private to avoid this error in the future.
Diffstat (limited to 'Swiften/Examples')
-rw-r--r-- | Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp | 2 | ||||
-rw-r--r-- | Swiften/Examples/SendMessage/SendMessage.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp index 5669be9..049802f 100644 --- a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp +++ b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp @@ -84,7 +84,7 @@ int main(int argc, char* argv[]) { } { - boost::shared_ptr<BoostTimer> timer(new BoostTimer(timeout, &MainBoostIOServiceThread::getInstance().getIOService())); + BoostTimer::ref timer(BoostTimer::create(timeout, &MainBoostIOServiceThread::getInstance().getIOService())); timer->onTick.connect(boost::bind(&SimpleEventLoop::stop, &eventLoop)); timer->start(); diff --git a/Swiften/Examples/SendMessage/SendMessage.cpp b/Swiften/Examples/SendMessage/SendMessage.cpp index efc12f6..2ba5f3b 100644 --- a/Swiften/Examples/SendMessage/SendMessage.cpp +++ b/Swiften/Examples/SendMessage/SendMessage.cpp @@ -72,7 +72,7 @@ int main(int argc, char* argv[]) { } { - boost::shared_ptr<BoostTimer> timer(new BoostTimer(30000, &MainBoostIOServiceThread::getInstance().getIOService())); + BoostTimer::ref timer(BoostTimer::create(30000, &MainBoostIOServiceThread::getInstance().getIOService())); timer->onTick.connect(boost::bind(&SimpleEventLoop::stop, &eventLoop)); timer->start(); |