aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Carroll <thecarrolls@jiminger.com>2013-09-26 11:23:44 -0700
committerJim Carroll <thecarrolls@jiminger.com>2013-09-26 11:23:44 -0700
commit2df043ac2f0936dc7f8e9fa24246119bddd4202c (patch)
tree1b95e39ae1b03cf25c46ebeed07cd06457ff0de9
parent6742497221ec146f33627434af044c4912c5e42f (diff)
parentfdbdda2b8a96131bde653617a7df7851b69fd967 (diff)
Merge pull request #3124 from koying/fixplugingetdirlock
FIX: avoid waiting forever on a locked CPluginDirectory while exiting
-rw-r--r--xbmc/Application.cpp6
-rw-r--r--xbmc/filesystem/PluginDirectory.cpp2
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))
{