summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f3cff94)
raw | patch | inline | side by side (parent: f3cff94)
author | ~/.gitconfig <moshe@forter.com> | |
Sun, 17 Aug 2014 08:45:19 +0000 (11:45 +0300) | ||
committer | ~/.gitconfig <moshe@forter.com> | |
Sun, 17 Aug 2014 08:45:19 +0000 (11:45 +0300) |
src/write_riemann.c | patch | blob | history |
diff --git a/src/write_riemann.c b/src/write_riemann.c
index 32c034c6080bd0a032c1c860ce2e6e08005fb4c0..7f0211f66647fc995a509d83825f3876d3798497 100644 (file)
--- a/src/write_riemann.c
+++ b/src/write_riemann.c
@@ -570,14 +570,14 @@ static Event *riemann_value_to_protobuf (struct riemann_host const *host, /* {{{
/* host = */ "", vl->plugin, vl->plugin_instance,
vl->type, vl->type_instance);
if (host->always_append_ds || (ds->ds_num > 1))
- if (host->prefix == NULL)
+ if (host->prefix == NULL || host->prefix[0] == '\0')
ssnprintf (service_buffer, sizeof (service_buffer),
"%s/%s", &name_buffer[1], ds->ds[index].name);
else
ssnprintf (service_buffer, sizeof (service_buffer),
"%s/%s/%s", host->prefix, &name_buffer[1], ds->ds[index].name);
else
- if (host->prefix == NULL)
+ if (host->prefix == NULL || host->prefix[0] == '\0')
sstrncpy (service_buffer, &name_buffer[1],
sizeof (service_buffer));
else