Skip to content

Commit dc4da5a

Browse files
pwhelanedsiper
authored andcommitted
in_calyptia_fleet: fix 'unable to find fleet by name'.
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
1 parent 0955024 commit dc4da5a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugins/in_calyptia_fleet/in_calyptia_fleet.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,10 @@ static msgpack_object *msgpack_lookup_map_key(msgpack_object *obj, const char *k
682682

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

685+
if (key->size != strlen(keyname)) {
686+
continue;
687+
}
688+
685689
if (strncmp(key->ptr, keyname, key->size) == 0) {
686690
return &cur->val;
687691
}
@@ -799,7 +803,7 @@ static ssize_t parse_fleet_search_json(struct flb_in_calyptia_fleet_config *ctx,
799803
break;
800804
}
801805

802-
fleet = msgpack_lookup_map_key(map, "ID");
806+
fleet = msgpack_lookup_map_key(map, "id");
803807
if (fleet == NULL) {
804808
flb_plg_error(ctx->ins, "unable to find fleet by name");
805809
break;

0 commit comments

Comments
 (0)