diff -r 648c0d5755f6 -r 63763f2a5c6c core/ForwardSys.cpp --- a/core/ForwardSys.cpp Tue Aug 27 08:39:15 2013 -0400 +++ b/core/ForwardSys.cpp Tue Aug 27 19:06:18 2013 -0400 @@ -208,7 +208,23 @@ void CForwardManager::OnPluginPauseChange(IPlugin *plugin, bool paused) { - /* No longer used */ + if(paused) + return; + + /* Attach any globally managed forwards */ + List::iterator iter; + CForward *fwd; + + for (iter=m_managed.begin(); iter!=m_managed.end(); iter++) + { + fwd = (*iter); + IPluginFunction *pFunc = plugin->GetBaseContext()->GetFunctionByName(fwd->GetForwardName()); + // Only add functions, if they aren't registered yet! + if (pFunc && !fwd->IsFunctionRegistered(pFunc)) + { + fwd->AddFunction(pFunc); + } + } } /************************************* @@ -739,6 +755,28 @@ return true; } +bool CForward::IsFunctionRegistered(IPluginFunction *func) +{ + FuncIter iter; + List *lst; + + if (func->IsRunnable()) + { + lst = &m_functions; + } else { + lst = &m_paused; + } + + for (iter=m_functions.begin(); iter!=m_functions.end(); iter++) + { + if ((*iter) == func) + { + return true; + } + } + return false; +} + const char *CForward::GetForwardName() { return m_name;