perl plugin: Added 'flush' fallback
[collectd.git] / bindings / perl / lib / Collectd.pm
index ddacf02..7e89e45 100644 (file)
@@ -296,6 +296,9 @@ sub plugin_register {
                        return plugin_register_notification($name, $data);
                }
                if (TYPE_FLUSH == $type) {
+                       #For collectd-5.6 only
+                       lock %{$plugins[$type]};
+                       $plugins[$type]->{$name} = $data;
                        return plugin_register_flush($name, $data);
                }
                lock %{$plugins[$type]};