mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 06:32:31 +00:00
* Removed the Object ctor taking an Object::type_type.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1026 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -67,7 +67,7 @@ DhtManager::load_dht_cache() {
|
||||
if (m_start == dht_disable || !control->core()->download_store()->is_enabled())
|
||||
return;
|
||||
|
||||
torrent::Object cache(torrent::Object::TYPE_MAP);
|
||||
torrent::Object cache = torrent::Object::create_map();
|
||||
std::fstream cache_file((control->core()->download_store()->path() + "rtorrent.dht_cache").c_str(), std::ios::in | std::ios::binary);
|
||||
|
||||
if (cache_file.is_open()) {
|
||||
@@ -147,7 +147,7 @@ DhtManager::save_dht_cache() {
|
||||
if (!cache_file.is_open())
|
||||
return;
|
||||
|
||||
torrent::Object cache(torrent::Object::TYPE_MAP);
|
||||
torrent::Object cache = torrent::Object::create_map();
|
||||
cache_file << *torrent::dht_manager()->store_cache(&cache);
|
||||
|
||||
if (!cache_file.good())
|
||||
@@ -279,7 +279,7 @@ DhtManager::log_statistics(bool force) {
|
||||
|
||||
torrent::Object
|
||||
DhtManager::dht_statistics() {
|
||||
torrent::Object dhtStats(torrent::Object::TYPE_MAP);
|
||||
torrent::Object dhtStats = torrent::Object::create_map();
|
||||
|
||||
dhtStats.insert_key("dht", dht_settings[m_start]);
|
||||
dhtStats.insert_key("active", torrent::dht_manager()->is_active());
|
||||
|
||||
@@ -136,9 +136,6 @@ DownloadFactory::receive_load() {
|
||||
} else {
|
||||
std::fstream* stream = new std::fstream(rak::path_expand(m_uri).c_str(), std::ios::in | std::ios::binary);
|
||||
m_stream = stream;
|
||||
|
||||
// Since FileStatusCache checks file stats, it will automatically
|
||||
// cull away invalid paths.
|
||||
m_isFile = true;
|
||||
|
||||
if (!stream->is_open())
|
||||
@@ -332,7 +329,9 @@ DownloadFactory::initialize_rtorrent(Download* download, torrent::Object* rtorre
|
||||
|
||||
rtorrent->insert_preserve_value("complete", 0);
|
||||
rtorrent->insert_preserve_value("hashing", Download::variable_hashing_stopped);
|
||||
|
||||
rtorrent->insert_preserve_cstr("tied_to_file", "");
|
||||
rtorrent->insert_key("loaded_file", m_isFile ? m_uri : std::string());
|
||||
|
||||
if (rtorrent->has_key_value("priority"))
|
||||
rpc::call_command("d.set_priority", rtorrent->get_key_value("priority") % 4, rpc::make_target(download));
|
||||
|
||||
+1
-1
@@ -405,7 +405,7 @@ Manager::try_create_download(const std::string& uri, int flags, const command_li
|
||||
// If the path was attempted loaded before, skip it.
|
||||
if (!(flags & create_raw_data) &&
|
||||
!is_network_uri(uri) &&
|
||||
!m_fileStatusCache->insert(uri, 0))
|
||||
!file_status_cache()->insert(uri, 0))
|
||||
return;
|
||||
|
||||
// Adding download.
|
||||
|
||||
Reference in New Issue
Block a user