Ticket #9231: mythdownloadmanager.patch

File mythdownloadmanager.patch, 1019 bytes (added by Jonatan <mythtv@…>, 10 years ago)
  • mythtv/libs/libmythbase/mythdownloadmanager.cpp

    diff --git a/mythtv/libs/libmythbase/mythdownloadmanager.cpp b/mythtv/libs/libmythbase/mythdownloadmanager.cpp
    index 49fcb65..a1d86c7 100644
    a b static void ShutdownMythDownloadManager(void) 
    131131 */
    132132MythDownloadManager *GetMythDownloadManager(void)
    133133{
     134    static QMutex mutex;
     135    mutex.lock();
    134136    if (!downloadManager)
    135137    {
    136138        downloadManager = new MythDownloadManager();
    MythDownloadManager *GetMythDownloadManager(void) 
    146148
    147149        atexit(ShutdownMythDownloadManager);
    148150    }
     151    mutex.unlock();
    149152
    150153    return downloadManager;
    151154}
    QDateTime MythDownloadManager::GetLastModified(const QString &url) 
    10281031    QDateTime result;
    10291032
    10301033    QDateTime now = QDateTime::currentDateTime();
     1034    m_infoLock->lock();
    10311035    QNetworkCacheMetaData urlData = m_manager->cache()->metaData(QUrl(url));
     1036    m_infoLock->unlock();
    10321037
    10331038    if (urlData.isValid())
    10341039    {