Skip to content

Commit

Permalink
decode_msgpack: Suppress underbar when empty namespace is decoded
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
  • Loading branch information
cosmo0920 committed Apr 19, 2024
1 parent c07fed4 commit 8cb2739
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cmt_decode_msgpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,10 @@ static int unpack_opts(mpack_reader_t *reader, struct cmt_opts *opts)
return CMT_DECODE_MSGPACK_ALLOCATION_ERROR;
}

cfl_sds_cat(opts->fqname, opts->ns, cfl_sds_len(opts->ns));
cfl_sds_cat(opts->fqname, "_", 1);
if (cfl_sds_len(opts->ns) > 0) {
cfl_sds_cat(opts->fqname, opts->ns, cfl_sds_len(opts->ns));
cfl_sds_cat(opts->fqname, "_", 1);
}

if (cfl_sds_len(opts->subsystem) > 0) {
cfl_sds_cat(opts->fqname, opts->subsystem, cfl_sds_len(opts->subsystem));
Expand Down

0 comments on commit 8cb2739

Please sign in to comment.