Skip to content

Commit 9ecd6cf

Browse files
Add seperate err msg for Unpack issue
Signed-off-by: Athish Pranav D <[email protected]>
1 parent e7b5c29 commit 9ecd6cf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

include/fluent-bit/flb_msgpack_append_message.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#define FLB_MAP_NOT_MODIFIED -1
2626
#define FLB_MAP_EXPANSION_ERROR -2
2727
#define FLB_MAP_EXPANSION_INVALID_VALUE_TYPE -3
28+
#define FLB_MSGPACK_UNPACK_ERROR -4
2829

2930
#include <fluent-bit/flb_pack.h>
3031
#include <msgpack/unpack.h>

src/flb_msgpack_append_message.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ int flb_msgpack_append_map_to_record(char **result_buffer,
114114
if ((i=msgpack_unpack_next(&unpacker, map_data, map_size, &off)) !=
115115
MSGPACK_UNPACK_SUCCESS ) {
116116
msgpack_unpacked_destroy(&unpacker);
117-
return FLB_MAP_EXPANSION_ERROR;
117+
return FLB_MSGPACK_UNPACK_ERROR;
118118
}
119119
if (unpacker.data.type != MSGPACK_OBJECT_MAP) {
120120
msgpack_unpacked_destroy(&unpacker);
121-
return FLB_MAP_EXPANSION_ERROR;
121+
return FLB_MSGPACK_UNPACK_ERROR;
122122
}
123123

124124
message_entry.val = unpacker.data;

0 commit comments

Comments
 (0)