Code

core: Changed internal API to allow for per-plugin intervals.
[collectd.git] / src / unixsock.c
index d729477bbc54db999322dedfe581834dc9725c21..f62ba3dc79f10e0512c7742910756a281a95ae0e 100644 (file)
@@ -276,7 +276,7 @@ static void *us_handle_client (void *arg)
                }
                else if (strcasecmp (fields[0], "putval") == 0)
                {
-                       handle_putval (fhout, buffer);
+                       handle_putval (fhout, buffer, /* default_interval = */ interval_g);
                }
                else if (strcasecmp (fields[0], "listval") == 0)
                {
@@ -465,12 +465,14 @@ static int us_shutdown (void)
        return (0);
 } /* int us_shutdown */
 
-void module_register (void)
+void module_register (plugin_loaddata_t *data)
 {
+       PLUGIN_INIT_INTERVAL (data);
+
        plugin_register_config ("unixsock", us_config,
                        config_keys, config_keys_num);
        plugin_register_init ("unixsock", us_init);
        plugin_register_shutdown ("unixsock", us_shutdown);
-} /* void module_register (void) */
+} /* void module_register (plugin_loaddata_t *data) */
 
 /* vim: set sw=4 ts=4 sts=4 tw=78 : */