feat(plugin_manager_init): set max_msg_per_stage as parameter

This commit is contained in:
yangwei
2024-09-06 13:41:40 +08:00
parent cc542dc365
commit 9cb50f81fb
4 changed files with 30 additions and 31 deletions

View File

@@ -92,7 +92,7 @@ static void plugin_manager_per_thread_data_free(struct plugin_manager_per_thread
return;
}
struct plugin_manager_schema *plugin_manager_init(struct stellar *st, const char *plugin_spec_file_path)
struct plugin_manager_schema *plugin_manager_init(struct stellar *st, const char *plugin_spec_file_path, unsigned int max_msg_per_stage)
{
int spec_num;
struct plugin_specific *specs = plugin_specs_load(plugin_spec_file_path, &spec_num);
@@ -101,8 +101,7 @@ struct plugin_manager_schema *plugin_manager_init(struct stellar *st, const char
return NULL;
}
struct plugin_manager_schema *plug_mgr = CALLOC(struct plugin_manager_schema, 1);
//TODO: set max_message_dispatch as parameter
plug_mgr->max_message_dispatch=MAX_MSG_PER_DISPATCH;
plug_mgr->max_message_dispatch=max_msg_per_stage;
if(spec_num > 0)
{
utarray_new(plug_mgr->plugin_load_specs_array,&plugin_specs_icd);