perl plugin: Changed pluginname form to allow single perl plugin flush. (Part 2,...
authorPavel Rochnyack <pavel2000@ngs.ru>
Thu, 11 Aug 2016 10:01:52 +0000 (16:01 +0600)
committerPavel Rochnyack <pavel2000@ngs.ru>
Fri, 16 Sep 2016 04:46:26 +0000 (10:46 +0600)
src/perl.c

index 1dd57a2..700bb98 100644 (file)
@@ -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;