修正插件调度模块中前一个插件detach不再更新plugin_id的问题。

This commit is contained in:
Lu Qiuwen
2018-11-23 20:47:09 +08:00
parent f2a425c4a5
commit 8016ff0386

View File

@@ -483,7 +483,7 @@ static void __stream_bev_readcb(struct bufferevent * bev, void * arg)
unsigned int plugin_id = 0;
for (const struct tfe_plugin * p_info_iter = tfe_plugin_iterate(&plugin_id_iter);
p_info_iter != NULL; p_info_iter = tfe_plugin_iterate(&plugin_id_iter))
p_info_iter != NULL; p_info_iter = tfe_plugin_iterate(&plugin_id_iter), plugin_id++)
{
_stream->calling_idx = plugin_id;
struct plugin_ctx * plug_ctx = &_stream->plugin_ctxs[plugin_id];
@@ -495,9 +495,7 @@ static void __stream_bev_readcb(struct bufferevent * bev, void * arg)
}
if (plug_ctx->state == PLUG_STATE_DETACHED)
{
continue;
}
if (p_info_iter->on_data != NULL)
{
@@ -506,11 +504,7 @@ static void __stream_bev_readcb(struct bufferevent * bev, void * arg)
}
if (plug_ctx->state == PLUG_STATE_PREEPTION)
{
action_final = action_tmp;
}
plugin_id++;
}
switch (action_final)