Skip to content
This repository
Browse code

Merge pull request #3124 from koying/fixplugingetdirlock

FIX: avoid waiting forever on a locked CPluginDirectory while exiting
  • Loading branch information...
commit 2df043ac2f0936dc7f8e9fa24246119bddd4202c 2 parents 6742497 + fdbdda2
authored September 26, 2013
6  xbmc/Application.cpp
@@ -3369,9 +3369,6 @@ void CApplication::Stop(int exitCode)
3369 3369
 
3370 3370
     SaveFileState(true);
3371 3371
 
3372  
-    // cancel any jobs from the jobmanager
3373  
-    CJobManager::GetInstance().CancelJobs();
3374  
-
3375 3372
     g_alarmClock.StopThread();
3376 3373
 
3377 3374
     if( m_bSystemScreenSaverEnable )
@@ -3394,6 +3391,9 @@ void CApplication::Stop(int exitCode)
3394 3391
     m_ExitCode = exitCode;
3395 3392
     CLog::Log(LOGNOTICE, "stop all");
3396 3393
 
  3394
+    // cancel any jobs from the jobmanager
  3395
+    CJobManager::GetInstance().CancelJobs();
  3396
+
3397 3397
     // stop scanning before we kill the network and so on
3398 3398
     if (m_musicInfoScanner->IsScanning())
3399 3399
       m_musicInfoScanner->Stop();
2  xbmc/filesystem/PluginDirectory.cpp
@@ -529,7 +529,7 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, int scri
529 529
       cancelled = true;
530 530
       startTime = XbmcThreads::SystemClockMillis();
531 531
     }
532  
-    if (cancelled && XbmcThreads::SystemClockMillis() - startTime > timeToKillScript)
  532
+    if ((cancelled && XbmcThreads::SystemClockMillis() - startTime > timeToKillScript) || g_application.m_bStop)
533 533
     { // cancel our script
534 534
       if (scriptId != -1 && CScriptInvocationManager::Get().IsRunning(scriptId))
535 535
       {

0 notes on commit 2df043a

Please sign in to comment.
Something went wrong with that request. Please try again.