| Summary: | KTorrent crashes when merging dht torrents | ||
|---|---|---|---|
| Product: | [Applications] ktorrent | Reporter: | Clara Gnos <clara.gnos> |
| Component: | general | Assignee: | Joris Guisson <joris.guisson> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Clara Gnos
2006-09-14 18:32:37 UTC
SVN commit 584817 by guisson:
Fixed crash when merging announce lists of torrents
BUG: 134079
M +2 -3 interfaces/trackerslist.cpp
M +1 -1 interfaces/trackerslist.h
M +1 -0 torrent/peersourcemanager.h
M +2 -2 torrent/queuemanager.cpp
M +2 -2 torrent/queuemanager.h
M +1 -1 torrent/torrentcontrol.cpp
--- trunk/extragear/network/ktorrent/libktorrent/interfaces/trackerslist.cpp #584816:584817
@@ -31,10 +31,9 @@
{
}
- void TrackersList::merge(TrackersList* al)
+ void TrackersList::merge(const KURL::List & urls)
{
- KURL::List urls = al->getTrackerURLs();
- KURL::List::iterator i = urls.begin();
+ KURL::List::const_iterator i = urls.begin();
while (i != urls.end())
{
addTracker(*i,true);
--- trunk/extragear/network/ktorrent/libktorrent/interfaces/trackerslist.h #584816:584817
@@ -72,7 +72,7 @@
* Merge an other tracker list.
* @param al The TrackersList
*/
- void merge(TrackersList* al);
+ void merge(const KURL::List & ul);
};
--- trunk/extragear/network/ktorrent/libktorrent/torrent/peersourcemanager.h #584816:584817
@@ -62,6 +62,7 @@
public:
PeerSourceManager(TorrentControl* tor,PeerManager* pman);
virtual ~PeerSourceManager();
+
/**
* Add a PeerSource, the difference between PeerSource and Tracker
--- trunk/extragear/network/ktorrent/libktorrent/torrent/queuemanager.cpp #584816:584817
@@ -269,7 +269,7 @@
return false;
}
- void QueueManager::mergeAnnounceList(const SHA1Hash & ih,kt::TrackersList* al)
+ void QueueManager::mergeAnnounceList(const SHA1Hash & ih,const KURL::List & urls)
{
QPtrList<kt::TorrentInterface>::iterator itr = downloads.begin();
while (itr != downloads.end())
@@ -278,7 +278,7 @@
if (tor->getTorrent().getInfoHash() == ih)
{
TrackersList* ta = tor->getTrackersList();
- ta->merge(al);
+ ta->merge(urls);
return;
}
itr++;
--- trunk/extragear/network/ktorrent/libktorrent/torrent/queuemanager.h #584816:584817
@@ -95,9 +95,9 @@
/**
* Merge announce lists to a torrent
* @param ih The info_hash of the torrent to merge to
- * @param al The TrackersList
+ * @param urls List of urls
*/
- void mergeAnnounceList(const SHA1Hash & ih,kt::TrackersList* al);
+ void mergeAnnounceList(const SHA1Hash & ih,const KURL::List & urls);
void setMaxDownloads(int m);
void setMaxSeeds(int m);
--- trunk/extragear/network/ktorrent/libktorrent/torrent/torrentcontrol.cpp #584816:584817
@@ -483,7 +483,7 @@
{
if (!stats.priv_torrent)
{
- qman->mergeAnnounceList(tor->getInfoHash(),psman);
+ qman->mergeAnnounceList(tor->getInfoHash(),tor->getTrackerList());
throw Error(i18n("You are already downloading this torrent %1, the list of trackers of both torrents has been merged.").arg(tor->getNameSuggestion()));
}
|