Added "type" to the value_list_t struct.
[collectd.git] / src / dns.c
index e9996b9..b61d768 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -301,9 +301,10 @@ static void submit_counter (const char *type, const char *type_instance,
        vl.time = time (NULL);
        strcpy (vl.host, hostname_g);
        strcpy (vl.plugin, "dns");
+       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 submit_counter */
 
 static void submit_octets (counter_t queries, counter_t responses)
@@ -319,8 +320,9 @@ static void submit_octets (counter_t queries, counter_t responses)
        vl.time = time (NULL);
        strcpy (vl.host, hostname_g);
        strcpy (vl.plugin, "dns");
+       strcpy (vl.type, "dns_octets");
 
-       plugin_dispatch_values ("dns_octets", &vl);
+       plugin_dispatch_values (&vl);
 } /* void submit_counter */
 
 static int dns_read (void)