From: Pavel Rochnyack Date: Thu, 11 Aug 2016 10:01:52 +0000 (+0600) Subject: perl plugin: Changed pluginname form to allow single perl plugin flush. (Part 2,... X-Git-Tag: collectd-5.7.0~80 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=cb447bc0c717d5ce6197c323f374e87be0022644;p=collectd.git perl plugin: Changed pluginname form to allow single perl plugin flush. (Part 2, fixed _plugin_unregister_generic() function to match _plugin_register_generic_userdata().) --- diff --git a/src/perl.c b/src/perl.c index 1dd57a2b..700bb989 100644 --- a/src/perl.c +++ b/src/perl.c @@ -1732,8 +1732,6 @@ typedef int perl_unregister_function_t(const char *name); static void _plugin_unregister_generic (pTHX, perl_unregister_function_t *unreg, const char *desc) { - char cb_name[DATA_MAX_NAME_LEN]; - dXSARGS; if (1 != items) { @@ -1750,9 +1748,7 @@ static void _plugin_unregister_generic (pTHX, log_debug ("Collectd::plugin_unregister_%s: plugin = \"%s\"", desc, SvPV_nolen (ST (0))); - ssnprintf (cb_name, sizeof (cb_name), "perl/%s", SvPV_nolen (ST (0))); - - unreg(cb_name); + unreg(SvPV_nolen (ST (0))); XSRETURN_EMPTY;