Code

core: Changed internal API to allow for per-plugin intervals.
[collectd.git] / src / olsrd.c
index be422ab61068d284ef5f1bbc9455bb7e9a214db4..5cc20f9cd39fbfa13e8e54039134ad62f9928110 100644 (file)
@@ -216,7 +216,7 @@ static void olsrd_submit (const char *plugin_instance, /* {{{ */
     const char *type, const char *type_instance, gauge_t value)
 {
   value_t values[1];
-  value_list_t vl = VALUE_LIST_INIT;
+  value_list_t vl = VALUE_LIST_INIT (plugin_interval);
 
   values[0].gauge = value;
 
@@ -698,11 +698,12 @@ static int olsrd_shutdown (void) /* {{{ */
   return (0);
 } /* }}} int olsrd_shutdown */
 
-void module_register (void)
+void module_register (plugin_loaddata_t *data)
 {
+  PLUGIN_INIT_INTERVAL (data);
   plugin_register_config ("olsrd", olsrd_config,
       config_keys, config_keys_num);
-  plugin_register_read ("olsrd", olsrd_read);
+  plugin_register_read ("olsrd", olsrd_read, plugin_interval);
   plugin_register_shutdown ("olsrd", olsrd_shutdown);
 } /* void module_register */