diff --git a/include/libtorrent/storage.hpp b/include/libtorrent/storage.hpp index 552b6e89f..8a10c7148 100755 --- a/include/libtorrent/storage.hpp +++ b/include/libtorrent/storage.hpp @@ -211,7 +211,9 @@ namespace libtorrent fs::path save_path() const; void async_release_files( - boost::function const& handler); + boost::function const& handler + = boost::function()); + void async_move_storage(fs::path const& p , boost::function const& handler); diff --git a/src/torrent.cpp b/src/torrent.cpp index 2e7e740db..fe1bf8091 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -1007,8 +1007,7 @@ namespace libtorrent // disconnect all peers and close all // files belonging to the torrents disconnect_all(); - if (m_owning_storage.get()) m_storage->async_release_files( - bind(&torrent::on_files_released, shared_from_this(), _1, _2)); + if (m_owning_storage.get()) m_storage->async_release_files(); m_owning_storage = 0; } @@ -2041,8 +2040,7 @@ namespace libtorrent , bind(&peer_connection::disconnect, _1)); assert(m_storage); - m_storage->async_release_files( - bind(&torrent::on_files_released, shared_from_this(), _1, _2)); + m_storage->async_release_files(); } // called when torrent is complete (all pieces downloaded)