diff --git a/include/fluent-bit/flb_msgpack_append_message.h b/include/fluent-bit/flb_msgpack_append_message.h index 25990c604f3..b2c5049febf 100644 --- a/include/fluent-bit/flb_msgpack_append_message.h +++ b/include/fluent-bit/flb_msgpack_append_message.h @@ -25,6 +25,7 @@ #define FLB_MAP_NOT_MODIFIED -1 #define FLB_MAP_EXPANSION_ERROR -2 #define FLB_MAP_EXPANSION_INVALID_VALUE_TYPE -3 +#define FLB_MSGPACK_UNPACK_ERROR -4 #include #include diff --git a/src/flb_msgpack_append_message.c b/src/flb_msgpack_append_message.c index 8425d9a2a63..d606721702d 100644 --- a/src/flb_msgpack_append_message.c +++ b/src/flb_msgpack_append_message.c @@ -114,11 +114,11 @@ int flb_msgpack_append_map_to_record(char **result_buffer, if ((i=msgpack_unpack_next(&unpacker, map_data, map_size, &off)) != MSGPACK_UNPACK_SUCCESS ) { msgpack_unpacked_destroy(&unpacker); - return FLB_MAP_EXPANSION_ERROR; + return FLB_MSGPACK_UNPACK_ERROR; } if (unpacker.data.type != MSGPACK_OBJECT_MAP) { msgpack_unpacked_destroy(&unpacker); - return FLB_MAP_EXPANSION_ERROR; + return FLB_MSGPACK_UNPACK_ERROR; } message_entry.val = unpacker.data;