Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: cfl: upgrade to v0.5.0 #52

Merged
merged 4 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/fluent-otel-proto
5 changes: 2 additions & 3 deletions src/ctr_decode_opentelemetry.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,12 @@ static int convert_bytes_value(struct opentelemetry_decode_value *ctr_val,
break;

case CTR_OPENTELEMETRY_TYPE_ARRAY:
result = cfl_array_append_bytes(ctr_val->cfl_arr, buf, len);
result = cfl_array_append_bytes(ctr_val->cfl_arr, buf, len, CFL_FALSE);
break;

case CTR_OPENTELEMETRY_TYPE_KVLIST:
result = cfl_kvlist_insert_bytes(ctr_val->cfl_kvlist, key, buf, len);
result = cfl_kvlist_insert_bytes(ctr_val->cfl_kvlist, key, buf, len, CFL_FALSE);
break;

}

if (result == -2) {
Expand Down
4 changes: 2 additions & 2 deletions tests/decoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static int generate_dummy_array_attribute_set(struct cfl_array **out_array, size
}

cfl_array_append_string(array, "string value");
cfl_array_append_bytes(array, "\xFF\xEE\xFF\xEE\xCA\xFE", 6);
cfl_array_append_bytes(array, "\xFF\xEE\xFF\xEE\xCA\xFE", 6, CFL_FALSE);
cfl_array_append_bool(array, CTR_TRUE);
cfl_array_append_int64(array, 303456);
cfl_array_append_double(array, 1.23456);
Expand Down Expand Up @@ -164,7 +164,7 @@ static int generate_dummy_kvlist_attribute_set(struct cfl_kvlist **out_kvlist, s
return -3;
}

result = cfl_kvlist_insert_bytes(kvlist, "bytes value", "\xFE\xEE\xFF\xEE\xCA\xFE", 6);
result = cfl_kvlist_insert_bytes(kvlist, "bytes value", "\xFE\xEE\xFF\xEE\xCA\xFE", 6, CFL_FALSE);

if (result != 0) {
return -3;
Expand Down
Loading