Skip to content

Commit

Permalink
Remove stdbool.h dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Edmund Rhudy <[email protected]>
  • Loading branch information
erhudy committed Oct 2, 2023
1 parent b53f578 commit ddac27c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions include/fluent-bit/flb_gzip.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#define FLB_GZIP_H

#include <fluent-bit/flb_info.h>
#include <fluent-bit/flb_macros.h>
#include <monkey/mk_http.h>
#include <stdbool.h>

struct flb_decompression_context;

Expand All @@ -37,6 +37,6 @@ void flb_gzip_decompression_context_destroy(void *context);
int flb_gzip_decompressor_dispatch(struct flb_decompression_context *context,
void *out_data, size_t *out_size);

bool flb_is_http_session_gzip_compressed(struct mk_http_session *session);
int flb_is_http_session_gzip_compressed(struct mk_http_session *session);

#endif
2 changes: 1 addition & 1 deletion plugins/in_http/http_prot.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ static int process_payload(struct flb_http *ctx, struct http_conn *conn,

gzip_compressed = flb_is_http_session_gzip_compressed(session);

if (gzip_compressed) {
if (gzip_compressed == FLB_TRUE) {
gzip_ret = flb_gzip_uncompress(request->data.data, request->data.len, (void **)&uncompressed_data, &uncompressed_size);
if (gzip_ret == -1) {
flb_error("[http] gzip decompression failed");
Expand Down
3 changes: 0 additions & 3 deletions plugins/in_splunk/splunk_prot.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,9 @@ static int process_hec_payload(struct flb_splunk *ctx, struct splunk_conn *conn,
struct mk_http_session *session,
struct mk_http_request *request)
{
int i = 0;
int ret = 0;
int type = -1;
struct mk_http_header *header;
int extra_size = -1;
struct mk_http_header *headers_extra;
int gzip_compressed = FLB_FALSE;
void *gz_data = NULL;
size_t gz_size = -1;
Expand Down
4 changes: 2 additions & 2 deletions src/flb_gzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,9 +747,9 @@ void flb_gzip_decompression_context_destroy(void *context)
}
}

bool flb_is_http_session_gzip_compressed(struct mk_http_session *session)
int flb_is_http_session_gzip_compressed(struct mk_http_session *session)
{
bool gzip_compressed = false;
int gzip_compressed = FLB_FALSE;

int i = 0;
int extra_size = -1;
Expand Down

0 comments on commit ddac27c

Please sign in to comment.