Skip to content

Commit

Permalink
custom_calyptia: correctly set fleet_id for out_calyptia when fleet_n…
Browse files Browse the repository at this point in the history
…ame is set.

Signed-off-by: Phillip Whelan <[email protected]>
  • Loading branch information
pwhelan authored and edsiper committed Oct 29, 2023
1 parent 06da717 commit 8d96a27
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions plugins/custom_calyptia/calyptia.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ static struct flb_output_instance *setup_cloud_output(struct flb_config *config,
}

if (ctx->fleet_id) {
flb_output_set_property(cloud, "fleet_id", ctx->fleet_id);
label = flb_sds_create_size(strlen("fleet_id") + strlen(ctx->fleet_id) + 1);

if (!label) {
Expand Down Expand Up @@ -469,11 +468,10 @@ static int cb_calyptia_init(struct flb_custom_instance *ins,
}

if (ctx->fleet_name) {
// TODO: set this once the fleet_id has been retrieved...
// flb_output_set_property(ctx->o, "fleet_id", ctx->fleet_id);
flb_input_set_property(ctx->fleet, "fleet_name", ctx->fleet_name);
}
else {

if (ctx->fleet_id) {
flb_output_set_property(ctx->o, "fleet_id", ctx->fleet_id);
flb_input_set_property(ctx->fleet, "fleet_id", ctx->fleet_id);
}
Expand Down

0 comments on commit 8d96a27

Please sign in to comment.