Skip to content

Commit

Permalink
Add seperate err msg for Unpack issue
Browse files Browse the repository at this point in the history
Signed-off-by: Athish Pranav D <[email protected]>
  • Loading branch information
Athishpranav2003 committed Sep 2, 2024
1 parent e7b5c29 commit 9ecd6cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/fluent-bit/flb_msgpack_append_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <fluent-bit/flb_pack.h>
#include <msgpack/unpack.h>
Expand Down
4 changes: 2 additions & 2 deletions src/flb_msgpack_append_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9ecd6cf

Please sign in to comment.