Added "type" to the value_list_t struct.
[collectd.git] / src / email.c
index f5a544a..50599c0 100644 (file)
@@ -39,6 +39,8 @@
 
 #include "configfile.h"
 
+#include <stddef.h>
+
 #if HAVE_LIBPTHREAD
 # include <pthread.h>
 #endif
@@ -733,9 +735,10 @@ static void email_submit (const char *type, const char *type_instance, gauge_t v
        vl.time = time (NULL);
        strcpy (vl.host, hostname_g);
        strcpy (vl.plugin, "email");
+       strncpy (vl.type, type, sizeof (vl.type));
        strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
 
-       plugin_dispatch_values (type, &vl);
+       plugin_dispatch_values (&vl);
 } /* void email_submit */
 
 /* Copy list l1 to list l2. l2 may partly exist already, but it is assumed