/* TODO: Use FORMAT_VL() here. */
ssnprintf (service_buffer, sizeof(service_buffer),
"%s-%s-%s-%s-%s", vl->plugin, vl->plugin_instance,
- vl->type, vl->type_instance, ds->ds[i].name);
+ vl->type, vl->type_instance, ds->ds[index].name);
event->service = strdup (service_buffer);
DEBUG ("riemann plugin: Successfully created protobuf for metric: "
{
msg->events[i] = riemann_value_to_protobuf (host, ds, vl,
(int) i, /* rates = */ NULL);
- if (msg->events[i])
+ if (msg->events[i] == NULL)
{
riemann_msg_protobuf_free (msg);
return (NULL);