Skip to content

Commit

Permalink
in_calyptia_fleet: fix 'unable to find fleet by name'.
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Adair Stewart Whelan <[email protected]>
  • Loading branch information
pwhelan authored and edsiper committed Sep 26, 2024
1 parent 0955024 commit dc4da5a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/in_calyptia_fleet/in_calyptia_fleet.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,10 @@ static msgpack_object *msgpack_lookup_map_key(msgpack_object *obj, const char *k

key = &cur->key.via.str;

if (key->size != strlen(keyname)) {
continue;
}

if (strncmp(key->ptr, keyname, key->size) == 0) {
return &cur->val;
}
Expand Down Expand Up @@ -799,7 +803,7 @@ static ssize_t parse_fleet_search_json(struct flb_in_calyptia_fleet_config *ctx,
break;
}

fleet = msgpack_lookup_map_key(map, "ID");
fleet = msgpack_lookup_map_key(map, "id");
if (fleet == NULL) {
flb_plg_error(ctx->ins, "unable to find fleet by name");
break;
Expand Down

0 comments on commit dc4da5a

Please sign in to comment.