Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: jzajic <[email protected]>
  • Loading branch information
jan-zajic committed Nov 3, 2022
1 parent b49061a commit 561bdc0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/flb_plugin_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,13 @@ static void flb_proxy_input_cb_resume(void *data, struct flb_config *config)
}

static void flb_plugin_proxy_destroy(struct flb_plugin_proxy *proxy);
static int flb_proxy_output_cb_exit(void *data, struct flb_config *config)
static int flb_proxy_output_cb_exit(void *data, void *out_context)
{
struct flb_output_plugin *instance = data;
struct flb_plugin_proxy *proxy = (instance->proxy);

struct flb_plugin_proxy_context *ctx = out_context;
if (proxy->def->proxy == FLB_PROXY_GOLANG) {
proxy_go_output_destroy(proxy->data);
proxy_go_output_destroy(ctx, proxy->data);
}
flb_plugin_proxy_destroy(proxy);
return 0;
Expand Down
4 changes: 2 additions & 2 deletions src/proxy/go/go.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int proxy_go_output_flush(struct flb_plugin_proxy_context *ctx,
return ret;
}

int proxy_go_output_destroy(void *data)
int proxy_go_output_destroy(struct flb_plugin_proxy_context *ctx, void *data)
{
int ret = 0;
struct flbgo_output_plugin *plugin;
Expand All @@ -154,7 +154,7 @@ int proxy_go_output_destroy(void *data)
flb_debug("[GO] running exit callback");

if (plugin->cb_exit_ctx) {
ret = plugin->cb_exit_ctx(plugin->context->remote_context);
ret = plugin->cb_exit_ctx(ctx->remote_context);
}
else if (plugin->cb_exit) {
ret = plugin->cb_exit();
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/go/go.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int proxy_go_output_init(struct flb_plugin_proxy *proxy);
int proxy_go_output_flush(struct flb_plugin_proxy_context *ctx,
const void *data, size_t size,
const char *tag, int tag_len);
int proxy_go_output_destroy(void *data);
int proxy_go_output_destroy(struct flb_plugin_proxy_context *ctx, void *data);

int proxy_go_input_register(struct flb_plugin_proxy *proxy,
struct flb_plugin_proxy_def *def);
Expand Down

0 comments on commit 561bdc0

Please sign in to comment.