1.1 --- a/core/systems/ForwardSys.cpp Fri Jan 19 05:48:08 2007 +0000
1.2 +++ b/core/systems/ForwardSys.cpp Fri Jan 19 08:22:44 2007 +0000
1.3 @@ -71,7 +71,7 @@
1.4 for (iter=m_managed.begin(); iter!=m_managed.end(); iter++)
1.5 {
1.6 fwd = (*iter);
1.7 - IPluginFunction *pFunc = plugin->GetFunctionByName(fwd->GetForwardName());
1.8 + IPluginFunction *pFunc = plugin->GetBaseContext()->GetFunctionByName(fwd->GetForwardName());
1.9 if (pFunc)
1.10 {
1.11 fwd->AddFunction(pFunc);
1.12 @@ -256,7 +256,8 @@
1.13 for (iter=m_functions.begin(); iter!=m_functions.end(); iter++)
1.14 {
1.15 func = (*iter);
1.16 - if (func->GetParentPlugin()->GetStatus() == Plugin_Paused)
1.17 + /* Ugh... */
1.18 + if (!func->GetParentContext()->IsRunnable())
1.19 {
1.20 continue;
1.21 }
1.22 @@ -565,15 +566,10 @@
1.23 m_errstate = SP_ERROR_NONE;
1.24 }
1.25
1.26 -bool CForward::AddFunction(sp_context_t *ctx, funcid_t index)
1.27 +bool CForward::AddFunction(IPluginContext *pContext, funcid_t index)
1.28 {
1.29 - IPlugin *pPlugin = g_PluginSys.FindPluginByContext(ctx);
1.30 - if (!pPlugin)
1.31 - {
1.32 - return false;
1.33 - }
1.34 + IPluginFunction *pFunc = pContext->GetFunctionById(index);
1.35
1.36 - IPluginFunction *pFunc = pPlugin->GetFunctionById(index);
1.37 if (!pFunc)
1.38 {
1.39 return false;
1.40 @@ -614,10 +610,11 @@
1.41 FuncIter iter;
1.42 IPluginFunction *func;
1.43 unsigned int removed = 0;
1.44 + IPluginContext *pContext = plugin->GetBaseContext();
1.45 for (iter=m_functions.begin(); iter!=m_functions.end();)
1.46 {
1.47 func = (*iter);
1.48 - if (func->GetParentPlugin() == plugin)
1.49 + if (func->GetParentContext() == pContext)
1.50 {
1.51 iter = m_functions.erase(iter);
1.52 removed++;