Code

core: Changed internal API to allow for per-plugin intervals.
[collectd.git] / src / curl.c
index 2160b980de5a18c3ca9a0f98a8ddf37469f18bf2..16de82216e810927e12d4aa71a8b2bda0d93099b 100644 (file)
@@ -572,7 +572,7 @@ static void cc_submit (const web_page_t *wp, const web_match_t *wm, /* {{{ */
     const cu_match_value_t *mv)
 {
   value_t values[1];
-  value_list_t vl = VALUE_LIST_INIT;
+  value_list_t vl = VALUE_LIST_INIT (plugin_interval);
 
   values[0] = mv->value;
 
@@ -590,7 +590,7 @@ static void cc_submit (const web_page_t *wp, const web_match_t *wm, /* {{{ */
 static void cc_submit_response_time (const web_page_t *wp, double seconds) /* {{{ */
 {
   value_t values[1];
-  value_list_t vl = VALUE_LIST_INIT;
+  value_list_t vl = VALUE_LIST_INIT (plugin_interval);
 
   values[0].gauge = seconds;
 
@@ -673,11 +673,13 @@ static int cc_shutdown (void) /* {{{ */
   return (0);
 } /* }}} int cc_shutdown */
 
-void module_register (void)
+void module_register (plugin_loaddata_t *data)
 {
+  PLUGIN_INIT_INTERVAL (data);
+
   plugin_register_complex_config ("curl", cc_config);
   plugin_register_init ("curl", cc_init);
-  plugin_register_read ("curl", cc_read);
+  plugin_register_read ("curl", cc_read, plugin_interval);
   plugin_register_shutdown ("curl", cc_shutdown);
 } /* void module_register */