* Fix a crash in DHT due to returning a reference to a temporary

variable. Patch by Josef Drexler for ticket #1221.

* Fix an off-by-one error that causes a crash if a DHT node advertises
an ID of "FFFFFFFF...". Patch by Josef Drexler.

* Fix a crash in initial seeding to due a typo not passing the right
flag. Patch by Josef Drexler.

* Fix d.connection_seed being set to "leech" when download wasn't set
to initial_seed. Patch by Josef Drexler for ticket #1376.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1061 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2008-07-05 12:01:00 +00:00
parent 108ec969f7
commit bfa7523677
+2 -1
View File
@@ -399,7 +399,8 @@ DownloadList::pause(Download* download, int flags) {
rpc::call_command("d.set_state_counter", rpc::call_command_value("d.get_state_counter", rpc::make_target(download)), rpc::make_target(download));
// If initial seeding is complete, don't try it again when restarting.
if (download->is_done())
if (download->is_done() &&
rpc::call_command_void("d.get_connection_current", rpc::make_target(download)).as_string() == "initial_seed")
rpc::call_command("d.set_connection_seed", rpc::call_command_void("d.get_connection_current", rpc::make_target(download)), rpc::make_target(download));
// Save the state after all the slots, etc have been called so we