Skip to content

Commit

Permalink
fixed: Plugins "return prematurely" due to race in WaitOnScriptResult.
Browse files Browse the repository at this point in the history
…xbmc#10136

(cherry picked from commit 252f56984e67529eaebc59d4b6366cbf2c83c64d)

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@33744 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information
jmarshallnz committed Sep 13, 2010
1 parent 8440ae9 commit 63a3bc1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions xbmc/FileSystem/PluginDirectory.cpp
Expand Up @@ -461,9 +461,12 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, const CS
#ifdef HAS_PYTHON
if (!g_pythonParser.isRunning(g_pythonParser.getScriptId(scriptPath.c_str())))
#endif
{ // nope - bail
CLog::Log(LOGDEBUG, " %s - plugin exited prematurely - terminating", __FUNCTION__);
m_success = false;
{ // check whether we exited normally
if (WaitForSingleObject(m_fetchComplete, 0) == WAIT_TIMEOUT)
{ // python didn't return correctly
CLog::Log(LOGDEBUG, " %s - plugin exited prematurely - terminating", __FUNCTION__);
m_success = false;
}
break;
}

Expand Down

0 comments on commit 63a3bc1

Please sign in to comment.