diff options
author | Jim Carroll <thecarrolls@jiminger.com> | 2013-09-26 11:23:44 -0700 |
---|---|---|
committer | Jim Carroll <thecarrolls@jiminger.com> | 2013-09-26 11:23:44 -0700 |
commit | 2df043ac2f0936dc7f8e9fa24246119bddd4202c (patch) | |
tree | 1b95e39ae1b03cf25c46ebeed07cd06457ff0de9 | |
parent | 6742497221ec146f33627434af044c4912c5e42f (diff) | |
parent | fdbdda2b8a96131bde653617a7df7851b69fd967 (diff) |
Merge pull request #3124 from koying/fixplugingetdirlock
FIX: avoid waiting forever on a locked CPluginDirectory while exiting
-rw-r--r-- | xbmc/Application.cpp | 6 | ||||
-rw-r--r-- | xbmc/filesystem/PluginDirectory.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index a10fc2c512..fd6970200d 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -3369,9 +3369,6 @@ void CApplication::Stop(int exitCode) SaveFileState(true); - // cancel any jobs from the jobmanager - CJobManager::GetInstance().CancelJobs(); - g_alarmClock.StopThread(); if( m_bSystemScreenSaverEnable ) @@ -3394,6 +3391,9 @@ void CApplication::Stop(int exitCode) m_ExitCode = exitCode; CLog::Log(LOGNOTICE, "stop all"); + // cancel any jobs from the jobmanager + CJobManager::GetInstance().CancelJobs(); + // stop scanning before we kill the network and so on if (m_musicInfoScanner->IsScanning()) m_musicInfoScanner->Stop(); diff --git a/xbmc/filesystem/PluginDirectory.cpp b/xbmc/filesystem/PluginDirectory.cpp index 438cd7b044..6c95b3ddd8 100644 --- a/xbmc/filesystem/PluginDirectory.cpp +++ b/xbmc/filesystem/PluginDirectory.cpp @@ -529,7 +529,7 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, int scri cancelled = true; startTime = XbmcThreads::SystemClockMillis(); } - if (cancelled && XbmcThreads::SystemClockMillis() - startTime > timeToKillScript) + if ((cancelled && XbmcThreads::SystemClockMillis() - startTime > timeToKillScript) || g_application.m_bStop) { // cancel our script if (scriptId != -1 && CScriptInvocationManager::Get().IsRunning(scriptId)) { |