summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 052b3cc)
raw | patch | inline | side by side (parent: 052b3cc)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 29 Aug 2010 07:50:59 +0000 (09:50 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 29 Aug 2010 07:50:59 +0000 (09:50 +0200) |
src/collectd-perl.pod | patch | blob | history | |
src/perl.c | patch | blob | history |
diff --git a/src/collectd-perl.pod b/src/collectd-perl.pod
index 5c11b65281cea66df6cf786f102e7abbb363ee0a..bacf8850f8443b5207b9287d1069018e0089cad5 100644 (file)
--- a/src/collectd-perl.pod
+++ b/src/collectd-perl.pod
@@ -376,11 +376,6 @@ is found (and the number of values matches the number of data-sources) then the
type, data-set and value-list is passed to all write-callbacks that are
registered with the daemon.
-B<Note>: Prior to version 4.4 of collectd, the data-set type used to be passed
-as the first argument to B<plugin_register>. This syntax is still supported
-for backwards compatibility but has been deprecated and will be removed in
-some future version of collectd.
-
=item B<plugin_write> ([B<plugins> => I<...>][, B<datasets> => I<...>],
B<valuelists> => I<...>)
diff --git a/src/perl.c b/src/perl.c
index a2f5da299bf92ae9679d3fd69b478f691540e3e4..afb3ba7e4d81419d3366c67f6a9cedf1d7684959 100644 (file)
--- a/src/perl.c
+++ b/src/perl.c
static XS (Collectd_plugin_dispatch_values)
{
SV *values = NULL;
- int values_idx = 0;
int ret = 0;
dXSARGS;
- if (2 == items) {
- log_warn ("Collectd::plugin_dispatch_values with two arguments "
- "is deprecated - pass the type through values->{type}.");
- values_idx = 1;
- }
- else if (1 != items) {
+ if (1 != items) {
log_err ("Usage: Collectd::plugin_dispatch_values(values)");
XSRETURN_EMPTY;
}
log_debug ("Collectd::plugin_dispatch_values: values=\"%s\"",
- SvPV_nolen (ST (values_idx)));
+ SvPV_nolen (ST (/* stack index = */ 0)));
- values = ST (values_idx);
+ values = ST (/* stack index = */ 0);
+ /* Make sure the argument is a hash reference. */
if (! (SvROK (values) && (SVt_PVHV == SvTYPE (SvRV (values))))) {
log_err ("Collectd::plugin_dispatch_values: Invalid values.");
XSRETURN_EMPTY;
}
- if (((2 == items) && (NULL == ST (0))) || (NULL == values))
- XSRETURN_EMPTY;
-
- if ((2 == items) && (NULL == hv_store ((HV *)SvRV (values), "type", 4,
- newSVsv (ST (0)), 0))) {
- log_err ("Collectd::plugin_dispatch_values: Could not store type.");
+ if (NULL == values)
XSRETURN_EMPTY;
- }
ret = pplugin_dispatch_values (aTHX_ (HV *)SvRV (values));