You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* Copy payload response to an output SDS buffer */
111
118
data = flb_sds_create_len(client->resp.payload,
112
-
client->resp.payload_size);
119
+
client->resp.payload_size);
113
120
114
121
flb_http_client_destroy(client);
115
122
flb_upstream_conn_release(u_conn);
@@ -143,20 +150,22 @@ static int example()
143
150
struct mk_list *head;
144
151
struct mk_list items;
145
152
int i;
153
+
int len;
146
154
char characters[] = "abcdefghijk";
147
155
struct item *an_item;
148
156
157
+
len = strlen(characters);
158
+
149
159
/* construct a list */
150
160
mk_list_init(&items);
151
161
152
-
for (i = 0; i < strlen(characters); i++) {
162
+
for (i = 0; i < len; i++) {
153
163
an_item = flb_malloc(sizeof(struct item));
154
164
if (!an_item) {
155
165
flb_errno();
156
166
return -1;
157
167
}
158
168
an_item->some_data = characters[i];
159
-
160
169
mk_list_add(&an_item->_head, &items);
161
170
}
162
171
@@ -184,7 +193,7 @@ Fluent Bit uses [msgpack](https://msgpack.org/index.html) to internally store da
184
193
185
194
Fluent Bit embeds the [msgpack-c](https://github.com/msgpack/msgpack-c) library. The example below shows manipulating message pack to add a new key-value pair to a record. In Fluent Bit, the [filter_record_modifier](plugins/filter_record_modifier) plugin adds or deletes keys from records. See its code for more.
0 commit comments