Skip to content

Commit

Permalink
Follow changes on plugin_register
Browse files Browse the repository at this point in the history
Upstream patch-number: 4527c9019
Upstream-patch-subject: plugin: decouple plugin registration and loading from GlobalConfig
  • Loading branch information
mochrul committed Dec 22, 2017
1 parent 26e552b commit 78abff5
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions modules/basicfuncs-plus/basic-funcs-plus.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ static Plugin basicfuncs_plus_plugins[] =
};

gboolean
basicfuncs_plus_module_init(GlobalConfig *cfg, CfgArgs *args)
basicfuncs_plus_module_init(PluginContext *context, CfgArgs *args)
{
plugin_register(cfg, basicfuncs_plus_plugins,
plugin_register(context, basicfuncs_plus_plugins,
G_N_ELEMENTS(basicfuncs_plus_plugins));
return TRUE;
}
Expand Down
4 changes: 2 additions & 2 deletions modules/grok/grok-parser-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ static Plugin grok_plugin =
};

gboolean
grok_module_init(GlobalConfig *cfg, CfgArgs *args G_GNUC_UNUSED)
grok_module_init(PluginContext *context, CfgArgs *args G_GNUC_UNUSED)
{
plugin_register(cfg, &grok_plugin, 1);
plugin_register(context, &grok_plugin, 1);
return TRUE;
}

Expand Down
4 changes: 2 additions & 2 deletions modules/kafka-c/kafka.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,9 @@ static Plugin kafka_plugin =
};

gboolean
kafka_c_module_init(GlobalConfig *cfg, CfgArgs *args)
kafka_c_module_init(PluginContext *context, CfgArgs *args)
{
plugin_register(cfg, &kafka_plugin, 1);
plugin_register(context, &kafka_plugin, 1);

return TRUE;
}
Expand Down
4 changes: 2 additions & 2 deletions modules/lua/lua-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ static Plugin lua_plugin =
};

gboolean
lua_module_init(GlobalConfig *cfg, CfgArgs *args G_GNUC_UNUSED)
lua_module_init(PluginContext *context, CfgArgs *args G_GNUC_UNUSED)
{
plugin_register(cfg, &lua_plugin, 1);
plugin_register(context, &lua_plugin, 1);
return TRUE;
}

Expand Down
4 changes: 2 additions & 2 deletions modules/monitor-source/monitor-source-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ static Plugin monitor_plugin =
};

gboolean
monitor_module_init(GlobalConfig *cfg, CfgArgs *args G_GNUC_UNUSED)
monitor_module_init(PluginContext *context, CfgArgs *args G_GNUC_UNUSED)
{
plugin_register(cfg, &monitor_plugin, 1);
plugin_register(context, &monitor_plugin, 1);
return TRUE;
}

Expand Down
4 changes: 2 additions & 2 deletions modules/perl/perl-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ static Plugin perl_plugin =
};

gboolean
perl_module_init(GlobalConfig *cfg, CfgArgs *args G_GNUC_UNUSED)
perl_module_init(PluginContext *context, CfgArgs *args G_GNUC_UNUSED)
{
int argc = 1;
char *argv[] = {"syslog-ng"};
char *env[] = {NULL};

PERL_SYS_INIT3(&argc, (char ***)&argv, (char ***)&env);

plugin_register(cfg, &perl_plugin, 1);
plugin_register(context, &perl_plugin, 1);
return TRUE;
}

Expand Down
4 changes: 2 additions & 2 deletions modules/rss/rss.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ static Plugin rss_plugin = {
};

gboolean
rss_module_init (GlobalConfig * cfg, CfgArgs * args)
rss_module_init (PluginContext *context, CfgArgs * args)
{
plugin_register (cfg, &rss_plugin, 1);
plugin_register (context, &rss_plugin, 1);
return TRUE;
}

Expand Down
4 changes: 2 additions & 2 deletions modules/trigger-source/trigger-source-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ static Plugin trigger_plugin =
};

gboolean
trigger_module_init(GlobalConfig *cfg, CfgArgs *args G_GNUC_UNUSED)
trigger_module_init(PluginContext *context, CfgArgs *args G_GNUC_UNUSED)
{
plugin_register(cfg, &trigger_plugin, 1);
plugin_register(context, &trigger_plugin, 1);
return TRUE;
}

Expand Down
4 changes: 2 additions & 2 deletions modules/zmq/zmq-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ static Plugin zmq_plugins[] =
};

gboolean
zmq_module_init(GlobalConfig *cfg, CfgArgs *args)
zmq_module_init(PluginContext *context, CfgArgs *args)
{
plugin_register(cfg, zmq_plugins, G_N_ELEMENTS(zmq_plugins));
plugin_register(context, zmq_plugins, G_N_ELEMENTS(zmq_plugins));
return TRUE;
}

Expand Down

0 comments on commit 78abff5

Please sign in to comment.