Merge branch 'collectd-4.4'
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 3 Jun 2008 17:20:49 +0000 (19:20 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 3 Jun 2008 17:20:49 +0000 (19:20 +0200)
ChangeLog
bindings/perl/Collectd.pm
contrib/cussh.pl
src/collectd.conf.in
src/perl.c
version-gen.sh

index 1a42ffd..e960ff6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2008-06-03, Version 4.4.1
+       * collectd: Fix the `DataSource' option within `Type' blocks. Thanks
+         to kyrone for reporting this.
+       * collectd: Fixed min/max output in notifications generated by
+         threshold checking.
+       * collectd-nagios: Fix the protocol used to communicate with the
+         daemon.
+       * perl plugin: Fail noisily, but don't shutdown the daemon, if
+         initialization has errors. An issue with Perl 5.10 has been fixed.
+       * teamspeak2 plugin: Fixed an out of bounce array access. Thanks to
+         RenĂ© Rebe and Siegmund Gorr for reporting this.
+
 2008-05-06, Version 4.4.0
        * collectd: Internal code cleanups.
        * collectd: Added support for a `Flush' command in the unixsock and
index 0da6c23..cca349e 100644 (file)
@@ -1,5 +1,5 @@
 # collectd - Collectd.pm
-# Copyright (C) 2007  Sebastian Harl
+# Copyright (C) 2007, 2008  Sebastian Harl
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by the
index 23a9078..2ec6308 100755 (executable)
@@ -57,6 +57,7 @@ use Collectd::Unixsock();
        my $sock = Collectd::Unixsock->new($path);
 
        my $cmds = {
+               HELP    => \&cmd_help,
                PUTVAL  => \&putval,
                GETVAL  => \&getval,
                FLUSH   => \&flush,
@@ -150,6 +151,25 @@ sub putid {
 
 =over 4
 
+=item B<HELP>
+
+=cut
+
+sub cmd_help {
+       print <<HELP;
+Available commands:
+  HELP
+  PUTVAL
+  GETVAL
+  FLUSH
+  LISTVAL
+
+See the embedded Perldoc documentation for details. To do that, run:
+  perldoc $0
+HELP
+       return 1;
+} # cmd_help
+
 =item B<GETVAL> I<Identifier>
 
 =cut
index a8361b4..25bc09e 100644 (file)
@@ -108,7 +108,7 @@ FQDNLookup   true
 #      IgnoreSelected false
 #</Plugin>
 
-#<Plugin df>
+#<Plugin disk>
 #      Disk "/^[hs]d[a-f][0-9]?$/"
 #      IgnoreSelected false
 #</Plugin>
index 43f9197..3a56da6 100644 (file)
@@ -1127,7 +1127,7 @@ static c_ithread_t *c_ithread_create (PerlInterpreter *base)
 
        aTHX = t->interp;
 
-       if (NULL != base) {
+       if ((NULL != base) && (NULL != PL_endav)) {
                av_clear (PL_endav);
                av_undef (PL_endav);
                PL_endav = Nullav;
@@ -1450,7 +1450,7 @@ static int init_pi (int argc, char **argv)
                log_err ("init_pi: pthread_key_create failed");
 
                /* this must not happen - cowardly giving up if it does */
-               exit (1);
+               return -1;
        }
 
 #ifdef __FreeBSD__
@@ -1485,7 +1485,13 @@ static int init_pi (int argc, char **argv)
 
        if (0 != perl_parse (aTHX_ xs_init, argc, argv, NULL)) {
                log_err ("init_pi: Unable to bootstrap Collectd.");
-               exit (1);
+
+               perl_destruct (perl_threads->head->interp);
+               perl_free (perl_threads->head->interp);
+               sfree (perl_threads);
+
+               pthread_key_delete (perl_thr_key);
+               return -1;
        }
 
        /* Set $0 to "collectd" because perl_parse() has to set it to "-e". */
@@ -1527,7 +1533,9 @@ static int perl_config_loadplugin (pTHX_ oconfig_item_t *ci)
                return (1);
        }
 
-       init_pi (perl_argc, perl_argv);
+       if (0 != init_pi (perl_argc, perl_argv))
+               return -1;
+
        assert (NULL != perl_threads);
        assert (NULL != perl_threads->head);
 
index ff29b22..755e116 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-DEFAULT_VERSION="4.4.0.git"
+DEFAULT_VERSION="4.4.1.git"
 
 VERSION="$( git describe 2> /dev/null | sed -e 's/^collectd-//' )"