From 18454d63443266bca33e7e0935186b0573f9bc6c Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 10 Jan 2010 03:02:46 +0000 Subject: [PATCH] replace trackers from resume data instead of adding them. --- docs/manual.rst | 4 ++++ src/torrent.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/docs/manual.rst b/docs/manual.rst index 8eca16abb..7befae891 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -2555,6 +2555,10 @@ replace it. If you want an immediate effect, you have to call If it is, it doesn't do anything. If it's not in the current set of trackers, it will insert it in the tier specified in the announce_entry. +The updated set of trackers will be saved in the resume data, and when a torrent +is started with resume data, the trackers from the resume data will replace the +original ones. + add_url_seed() remove_url_seed() url_seeds() -------------------------------------------- diff --git a/src/torrent.cpp b/src/torrent.cpp index eb761bc77..7be496adf 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -3512,6 +3512,7 @@ namespace libtorrent lazy_entry const* trackers = rd.dict_find_list("trackers"); if (trackers) { + m_trackers.clear(); int tier = 0; for (int i = 0; i < trackers->list_size(); ++i) {