mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-14 13:16:17 +00:00
More dht manager logging.
This commit is contained in:
+5
-10
@@ -87,22 +87,17 @@ DhtManager::load_dht_cache() {
|
|||||||
LT_LOG_THIS("cache file corrupted, discarding (path:%s)", cache_filename.c_str());
|
LT_LOG_THIS("cache file corrupted, discarding (path:%s)", cache_filename.c_str());
|
||||||
cache = torrent::Object::create_map();
|
cache = torrent::Object::create_map();
|
||||||
} else {
|
} else {
|
||||||
LT_LOG_THIS("cache file loaded (path:%s)", cache_filename.c_str());
|
LT_LOG_THIS("cache file read (path:%s)", cache_filename.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
LT_LOG_THIS("could not open cache file (path:%s)", cache_filename.c_str());
|
LT_LOG_THIS("could not open cache file (path:%s)", cache_filename.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
torrent::dht_manager()->initialize(cache);
|
||||||
torrent::dht_manager()->initialize(cache);
|
|
||||||
|
|
||||||
if (m_start == dht_on)
|
if (m_start == dht_on)
|
||||||
start_dht();
|
start_dht();
|
||||||
|
|
||||||
} catch (torrent::local_error& e) {
|
|
||||||
LT_LOG_THIS("initialization failed (error:%s)", e.what());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -110,7 +105,7 @@ DhtManager::start_dht() {
|
|||||||
priority_queue_erase(&taskScheduler, &m_stopTimeout);
|
priority_queue_erase(&taskScheduler, &m_stopTimeout);
|
||||||
|
|
||||||
if (!torrent::dht_manager()->is_valid()) {
|
if (!torrent::dht_manager()->is_valid()) {
|
||||||
LT_LOG_THIS("server start skipped, manager is invalid", 0);
|
LT_LOG_THIS("server start skipped, manager is uninitialized", 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user