Code

Added "type" to the value_list_t struct.
[collectd.git] / src / iptables.c
index 72b4481cc5148ff500d6ed01076c12378a6c3932..5e9619afc44186e8e3d1ba18c549325af08a9954 100644 (file)
@@ -242,11 +242,13 @@ static int submit_match (const struct ipt_entry_match *match,
     }
     vl.type_instance[sizeof (vl.type_instance) - 1] = '\0';
 
+    strcpy (vl.type, "ipt_bytes");
     values[0].counter = (counter_t) entry->counters.bcnt;
-    plugin_dispatch_values ("ipt_bytes", &vl);
+    plugin_dispatch_values (&vl);
 
+    strcpy (vl.type, "ipt_packets");
     values[0].counter = (counter_t) entry->counters.pcnt;
-    plugin_dispatch_values ("ipt_packets", &vl);
+    plugin_dispatch_values (&vl);
 
     return (0);
 } /* void submit_match */