Code

core: Changed internal API to allow for per-plugin intervals.
[collectd.git] / src / iptables.c
index 49454f050d755283b5cec6094a003116983e21fb..e620d38aa90648cf6092847f67e3ee9b3e55bf16 100644 (file)
@@ -246,7 +246,7 @@ static int submit6_match (const struct ip6t_entry_match *match,
 {
     int status;
     value_t values[1];
-    value_list_t vl = VALUE_LIST_INIT;
+    value_list_t vl = VALUE_LIST_INIT (plugin_interval);
 
     /* Select the rules to collect */
     if (chain->rule_type == RTYPE_NUM)
@@ -307,7 +307,7 @@ static int submit_match (const struct ipt_entry_match *match,
 {
     int status;
     value_t values[1];
-    value_list_t vl = VALUE_LIST_INIT;
+    value_list_t vl = VALUE_LIST_INIT (plugin_interval);
 
     /* Select the rules to collect */
     if (chain->rule_type == RTYPE_NUM)
@@ -511,11 +511,13 @@ static int iptables_shutdown (void)
     return (0);
 } /* int iptables_shutdown */
 
-void module_register (void)
+void module_register (plugin_loaddata_t *data)
 {
+    PLUGIN_INIT_INTERVAL (data);
+
     plugin_register_config ("iptables", iptables_config,
            config_keys, config_keys_num);
-    plugin_register_read ("iptables", iptables_read);
+    plugin_register_read ("iptables", iptables_read, plugin_interval);
     plugin_register_shutdown ("iptables", iptables_shutdown);
 } /* void module_register */