X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=bindings%2Fperl%2Flib%2FCollectd.pm;h=7e89e45f5d05c60c4de44275757dbe9884c52332;hb=307c875e5a78a2729fbbe1a588d232e9a129d75a;hp=576e5f431534175ee652c02163af12ad8ce93704;hpb=108b6a44ac3e33a0a745b914d61126a5c7048ac0;p=collectd.git diff --git a/bindings/perl/lib/Collectd.pm b/bindings/perl/lib/Collectd.pm index 576e5f43..7e89e45f 100644 --- a/bindings/perl/lib/Collectd.pm +++ b/bindings/perl/lib/Collectd.pm @@ -180,13 +180,13 @@ sub plugin_call_all { } if (TYPE_LOG != $type) { - DEBUG ("Collectd::plugin_call: type = \"$type\" (" + DEBUG ("Collectd::plugin_call_all: type = \"$type\" (" . $types{$type} . "), args=\"" . join(', ', map { defined($_) ? $_ : '' } @_) . "\""); } if (! defined $plugins[$type]) { - ERROR ("Collectd::plugin_call: unknown type \"$type\""); + ERROR ("Collectd::plugin_call_all: unknown type \"$type\""); return; } @@ -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]};