cleanup the mana c plugin
This commit is contained in:
parent
47926ce5e1
commit
47b8977807
1 changed files with 8 additions and 6 deletions
|
@ -9,28 +9,30 @@ struct Context
|
||||||
|
|
||||||
MANA_DEFINE_PLUGIN_INIT(init)
|
MANA_DEFINE_PLUGIN_INIT(init)
|
||||||
{
|
{
|
||||||
log_set_level(LOG_DEBUG);
|
log_set_level(LOG_INFO);
|
||||||
struct Context *ctx = calloc(1, sizeof(*ctx));
|
struct Context *ctx = calloc(1, sizeof(*ctx));
|
||||||
log_debug("init: ctx=%p", ctx);
|
log_info("init: ctx=%p", ctx);
|
||||||
return ctx;
|
return ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
MANA_DEFINE_PLUGIN_SHUTDOWN(shutdown)
|
MANA_DEFINE_PLUGIN_SHUTDOWN(shutdown)
|
||||||
{
|
{
|
||||||
(void)context;
|
log_info("shutdown: ctx=%p", context);
|
||||||
log_debug("shutdown");
|
free(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
MANA_DEFINE_PLUGIN_BEGIN_RUN(begin_run)
|
MANA_DEFINE_PLUGIN_BEGIN_RUN(begin_run)
|
||||||
{
|
{
|
||||||
log_debug("begin_run: ctx=%p, descriptor_json=%s", context, descriptor_json);
|
(void)descriptor_json;
|
||||||
|
log_info("begin_run: ctx=%p", context);
|
||||||
/* pretty useless as the json needs to be parsed back into some c structure describing the input
|
/* pretty useless as the json needs to be parsed back into some c structure describing the input
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
MANA_DEFINE_PLUGIN_END_RUN(end_run)
|
MANA_DEFINE_PLUGIN_END_RUN(end_run)
|
||||||
{
|
{
|
||||||
log_debug("end: ctx=%p, descriptor_json=%s", context, descriptor_json);
|
(void)descriptor_json;
|
||||||
|
log_info("end: ctx=%p", context);
|
||||||
}
|
}
|
||||||
|
|
||||||
MANA_DEFINE_PLUGIN_EVENT_DATA(process_event)
|
MANA_DEFINE_PLUGIN_EVENT_DATA(process_event)
|
||||||
|
|
Loading…
Reference in a new issue