* Changed the usage of rand() to random() as we only seed the latter.

* Added corrupt_file, an utility to corrupt files to test chunk
hashing.

* Added "start_tied" option, and don't clear "tied_to_file" when
*_untied are called.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@725 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-06-19 13:01:24 +00:00
parent f1c9188d55
commit d2fc993514
3 changed files with 30 additions and 5 deletions
+1 -1
View File
@@ -259,7 +259,7 @@ DownloadFactory::initialize_rtorrent(Download* download, torrent::Object* rtorre
download->tracker_list()->set_key(rtorrent->get_key("key").as_value());
} else {
download->tracker_list()->set_key(rand() % (std::numeric_limits<uint32_t>::max() - 1) + 1);
download->tracker_list()->set_key(random() % (std::numeric_limits<uint32_t>::max() - 1) + 1);
rtorrent->insert_key("key", download->tracker_list()->key());
}