Skip to content

Commit

Permalink
out_influxdb: add missing MSGPACK_OBJECT_FLOAT32 to influxdb_format
Browse files Browse the repository at this point in the history
Signed-off-by: Masoud Koleini <[email protected]>
  • Loading branch information
koleini authored and edsiper committed Nov 18, 2019
1 parent cb835ab commit 5bf04fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/out_influxdb/influxdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static char *influxdb_format(const char *tag, int tag_len,
val = tmp;
val_len = snprintf(tmp, sizeof(tmp) - 1, "%" PRId64, v->via.i64);
}
else if (v->type == MSGPACK_OBJECT_FLOAT) {
else if (v->type == MSGPACK_OBJECT_FLOAT || v->type == MSGPACK_OBJECT_FLOAT32) {
val = tmp;
val_len = snprintf(tmp, sizeof(tmp) - 1, "%f", v->via.f64);
}
Expand Down Expand Up @@ -554,7 +554,7 @@ int is_tagged_key(struct flb_influxdb_config *ctx, const char *key, int kl, int

if (ctx->tag_keys) {
mk_list_foreach(head, ctx->tag_keys) {
entry = mk_list_entry(head, struct flb_split_entry ,_head);
entry = mk_list_entry(head, struct flb_split_entry, _head);
if (kl == entry->len && strncmp(key, entry->value, kl) == 0) {
return FLB_TRUE;
}
Expand Down

0 comments on commit 5bf04fe

Please sign in to comment.