summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bc4a61e)
raw | patch | inline | side by side (parent: bc4a61e)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 21 Aug 2008 08:47:18 +0000 (10:47 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Thu, 21 Aug 2008 09:12:59 +0000 (11:12 +0200) |
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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 dac80bf7dcc3b666b236fef7ae8691a48bb10d8e..7cd5d72e8d66f4d721e55a339cbf653794d85ea0 100644 (file)
--- a/src/collectd-perl.pod
+++ b/src/collectd-perl.pod
=item TYPE_FLUSH
-The only argument passed is I<timeout> which indicates that only data older
-than I<timeout> seconds is to be flushed.
+The arguments passed are I<timeout> and I<identifier>. I<timeout> indicates
+that only data older than I<timeout> seconds is to be flushed. I<identifier>
+specifies which values are to be flushed.
=item TYPE_LOG
diff --git a/src/perl.c b/src/perl.c
index e6bb25ef21ec2c86330d92666b9b5852f08554b8..810636074b9901903ae5789ef22fd08499bee5c3 100644 (file)
--- a/src/perl.c
+++ b/src/perl.c
else if (PLUGIN_FLUSH == type) {
/*
* $_[0] = $timeout;
+ * $_[1] = $identifier;
*/
XPUSHs (sv_2mortal (newSViv (va_arg (ap, int))));
+ XPUSHs (sv_2mortal (newSVpv (va_arg (ap, char *), 0)));
}
PUTBACK;
return pplugin_call_all (aTHX_ PLUGIN_NOTIF, notif);
} /* static int perl_notify (const notification_t *) */
-/* TODO: Implement flushing of single identifiers. */
static int perl_flush (int timeout, const char *identifier)
{
dTHX;
aTHX = t->interp;
}
- return pplugin_call_all (aTHX_ PLUGIN_FLUSH, timeout);
+ return pplugin_call_all (aTHX_ PLUGIN_FLUSH, timeout, identifier);
} /* static int perl_flush (const int) */
static int perl_shutdown (void)