linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #04895
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2707: fix MappingManager shutdown crash
------------------------------------------------------------
revno: 2707
committer: poy <poy@xxxxxxxxxx>
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();