Permalink
Browse files

Revert "Revert "Prevent multiple instances of the same DownloadInfo p…

…ointer being added to the cancellation queue""

This reverts commit e715acc.
  • Loading branch information...
jyavenard committed Aug 11, 2013
1 parent fd132e6 commit ea2e3c89186a794cc1d54a92c9624a6dd29ab5bc
Showing with 7 additions and 3 deletions.
  1. +7 −3 mythtv/libs/libmythbase/mythdownloadmanager.cpp
@@ -873,18 +873,22 @@ void MythDownloadManager::cancelDownload(const QString &url)
dlInfo = lit.value();
if (dlInfo->m_url == url)
{
m_cancellationQueue.append(dlInfo);
if (!m_cancellationQueue.contains(dlInfo))
m_cancellationQueue.append(dlInfo);
lit.remove();
}
}
if (m_downloadInfos.contains(url))
{
dlInfo = m_downloadInfos[url];
if (!m_cancellationQueue.contains(dlInfo))
m_cancellationQueue.append(dlInfo);
if (dlInfo->m_reply)
m_downloadReplies.remove(dlInfo->m_reply);
m_cancellationQueue.append(dlInfo);
m_downloadInfos.remove(url);
}
@@ -902,7 +906,7 @@ void MythDownloadManager::downloadCanceled()
{
lit.next();
dlInfo = lit.value();
// this shouldn't happen
if (dlInfo->m_reply)
{
LOG(VB_FILE, LOG_DEBUG,

0 comments on commit ea2e3c8

Please sign in to comment.