* Discard dht cache if it is corrupt, instead of killing rtorrent.

* Minor fixes to the configure script.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1120 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2009-12-30 01:29:20 +00:00
parent 8987be3001
commit 027edf9dcd
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -73,8 +73,12 @@ DhtManager::load_dht_cache() {
if (cache_file.is_open()) {
cache_file >> cache;
if (cache_file.fail())
throw torrent::input_error("Invalid DHT cache.");
// If the cache file is corrupted we will just discard it with an
// error message.
if (cache_file.fail()) {
control->core()->push_log("DHT warning: Cache file corrupted, discarding.");
cache = torrent::Object::create_map();
}
}
try {