------------------------------------------------------------
revno: 2707
committer: poy <[email protected]>
branch nick: trunk
timestamp: Thu 2011-12-08 19:01:40 +0100
message:
fix MappingManager shutdown crash
modified:
dcpp/MappingManager.cpp
dcpp/MappingManager.h
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/MappingManager.cpp'
--- dcpp/MappingManager.cpp 2011-10-22 16:41:13 +0000
+++ dcpp/MappingManager.cpp 2011-12-08 18:01:40 +0000
@@ -56,6 +56,8 @@
}
void MappingManager::close() {
+ join();
+
if(renewal) {
renewal = 0;
TimerManager::getInstance()->removeListener(this);
@@ -74,8 +76,8 @@
int MappingManager::run() {
ScopedFunctor([this] { busy.clear(); });
- // shortcuts
- const auto&
+ // cache ports
+ auto
conn_port = ConnectionManager::getInstance()->getPort(),
secure_port = ConnectionManager::getInstance()->getSecurePort(),
search_port = SearchManager::getInstance()->getPort();
=== modified file 'dcpp/MappingManager.h'
--- dcpp/MappingManager.h 2011-10-22 16:41:13 +0000
+++ dcpp/MappingManager.h 2011-12-08 18:01:40 +0000
@@ -61,7 +61,7 @@
uint64_t renewal; /// when the next renewal should happen, if requested by the mapper.
MappingManager() : busy(false), renewal(0) { }
- virtual ~MappingManager() { join(); }
+ virtual ~MappingManager() { }
int run();
_______________________________________________
Mailing list: https://launchpad.net/~linuxdcpp-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~linuxdcpp-team
More help : https://help.launchpad.net/ListHelp