Code

collectd.git
8 years agoMerge branch 'collectd-5.5'
Marc Fournier [Tue, 12 Jan 2016 13:02:23 +0000 (14:02 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Tue, 12 Jan 2016 08:03:09 +0000 (09:03 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agowrite_redis: don't return with lock held
Ruben Kerkhof [Sat, 28 Nov 2015 17:37:15 +0000 (18:37 +0100)]
write_redis: don't return with lock held

8 years agoredis plugin: make sure buffer is null-terminated
Ruben Kerkhof [Sun, 29 Nov 2015 16:52:26 +0000 (17:52 +0100)]
redis plugin: make sure buffer is null-terminated

CID 37938

8 years agoperl: unlock mutex on error
Ruben Kerkhof [Sun, 29 Nov 2015 17:06:33 +0000 (18:06 +0100)]
perl: unlock mutex on error

CID 37970

8 years agoopenvpn: free resource on error
Ruben Kerkhof [Sun, 29 Nov 2015 17:27:56 +0000 (18:27 +0100)]
openvpn: free resource on error

8 years agoopenvpn: fix error message
Ruben Kerkhof [Sun, 29 Nov 2015 17:23:17 +0000 (18:23 +0100)]
openvpn: fix error message

8 years agoopenvpn: check return value of malloc
Ruben Kerkhof [Sun, 29 Nov 2015 17:22:30 +0000 (18:22 +0100)]
openvpn: check return value of malloc

CID 37987

8 years agocurl_json: remove dead code
Ruben Kerkhof [Sat, 28 Nov 2015 19:27:22 +0000 (20:27 +0100)]
curl_json: remove dead code

CID 37963

8 years agosnmp plugin: don't read from uninitialized pointer
Ruben Kerkhof [Fri, 4 Dec 2015 18:31:16 +0000 (19:31 +0100)]
snmp plugin: don't read from uninitialized pointer

if the first snmp_pdu_create inside the loop returns an error,
we exit the loop with res uninitialized and then call snmp_free_pdu on it.

CID #38037

8 years agolibcollectdclient: don't close socket twice
Ruben Kerkhof [Fri, 4 Dec 2015 18:02:32 +0000 (19:02 +0100)]
libcollectdclient: don't close socket twice

CID #38039

8 years agoemail plugin: fix check for result of malloc
Ruben Kerkhof [Sat, 12 Dec 2015 11:24:41 +0000 (12:24 +0100)]
email plugin: fix check for result of malloc

CID #38010

8 years agoFixed rrdtool sigsegv (datadir==NULL ptr dereferencing)
Claudius Zingerli [Tue, 5 Jan 2016 17:22:22 +0000 (18:22 +0100)]
Fixed rrdtool sigsegv (datadir==NULL ptr dereferencing)

8 years agoopenldap plugin: fix build on OSX El Capitan
Ruben Kerkhof [Fri, 25 Dec 2015 08:39:44 +0000 (09:39 +0100)]
openldap plugin: fix build on OSX El Capitan

OpenLDAP is deprecated in OSX El Capitan.
Apple would like us to use the OpenDirectory Framework instead.

Treat these deprecation warnings as warnings, not errors.

8 years agocollectd.conf.pod: mention IPv6 option to the iptables plugin
Marc Fournier [Tue, 12 Jan 2016 05:52:54 +0000 (06:52 +0100)]
collectd.conf.pod: mention IPv6 option to the iptables plugin

Thanks to @michaelsalmon for pointing this out !

Fix #1496

8 years agoremove the addressof in the sizeof
Laurent [Wed, 6 Jan 2016 09:52:31 +0000 (10:52 +0100)]
remove the addressof in the sizeof

quick fix for issue 1501?
the new warning for pointer access introduced in gcc 4.8 helped to find
this one.

8 years agodisk plugin: Declare alt_name only when libudev is available.
Florian Forster [Fri, 18 Dec 2015 10:11:15 +0000 (11:11 +0100)]
disk plugin: Declare alt_name only when libudev is available.

Coverity whines about "output_name = alt_name" being dead code because
it sees alt_name as beeing NULL always.

CID: 48417

8 years agonetwork plugin: Coding style fixes.
Florian Forster [Fri, 18 Dec 2015 08:26:14 +0000 (09:26 +0100)]
network plugin: Coding style fixes.

This fixes a number of sizeof() operations which did not follow our best
practice of using the variable rather than its type. It also removes
unnecessary (void *) casts.

8 years agonetwork plugin: Check range of pkg_numval.
Florian Forster [Fri, 18 Dec 2015 08:24:19 +0000 (09:24 +0100)]
network plugin: Check range of pkg_numval.

This is essentially the same as the check using exp_size a couple lines
earlier, but that appears to be too indirect for Coverity to understand.
This hopefully fixes the resulting "tainted_data_return" errors.

CID: 48420

8 years agoMerge branch 'collectd-5.5'
Florian Forster [Thu, 17 Dec 2015 14:19:00 +0000 (15:19 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Florian Forster [Thu, 17 Dec 2015 14:18:45 +0000 (15:18 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoperl plugin: Check "return value" of PERL_GET_CONTEXT.
Florian Forster [Thu, 17 Dec 2015 14:13:39 +0000 (15:13 +0100)]
perl plugin: Check "return value" of PERL_GET_CONTEXT.

CID: 37985

8 years agoemail plugin: Don't call type_list_incr() with type == NULL.
Florian Forster [Thu, 17 Dec 2015 13:57:13 +0000 (14:57 +0100)]
email plugin: Don't call type_list_incr() with type == NULL.

CID: 37988

8 years agowrite_http plugin: Check return status of cf_util_get_*().
Florian Forster [Thu, 17 Dec 2015 13:43:31 +0000 (14:43 +0100)]
write_http plugin: Check return status of cf_util_get_*().

CID: 37949

8 years agogmond plugin: Inline the plugin_dispatch_values() call.
Florian Forster [Thu, 17 Dec 2015 13:25:19 +0000 (14:25 +0100)]
gmond plugin: Inline the plugin_dispatch_values() call.

Since version 5.3, a write queue is used. This means that the
plugin_dispatch_values() call will create a copy of the value list and
return quickly. Creating yet another copy here is therefore not as useful
anymore.

CID: 38114

8 years agogmond plugin: Check return value of sendto(2).
Florian Forster [Thu, 17 Dec 2015 13:18:59 +0000 (14:18 +0100)]
gmond plugin: Check return value of sendto(2).

CID: 38113

8 years agogmond plugin: Check return value of setsockopt(2).
Florian Forster [Thu, 17 Dec 2015 13:21:27 +0000 (14:21 +0100)]
gmond plugin: Check return value of setsockopt(2).

CID: 38112

8 years agozfs_arc plugin: Rewrite Linux parsing logic.
Florian Forster [Thu, 17 Dec 2015 12:32:29 +0000 (13:32 +0100)]
zfs_arc plugin: Rewrite Linux parsing logic.

CID: 38028

8 years agoMerge branch 'collectd-5.5'
Florian Forster [Thu, 17 Dec 2015 12:41:46 +0000 (13:41 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Florian Forster [Thu, 17 Dec 2015 12:41:18 +0000 (13:41 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agozfs_arc plugin: Plug memory leak on Linux.
Florian Forster [Thu, 17 Dec 2015 12:34:12 +0000 (13:34 +0100)]
zfs_arc plugin: Plug memory leak on Linux.

CID: 42796
Signed-off-by: Florian Forster <octo@collectd.org>
8 years agoconfigure.ac: warn when pkg-config is not installed
Ruben Kerkhof [Sat, 12 Dec 2015 15:43:55 +0000 (16:43 +0100)]
configure.ac: warn when pkg-config is not installed

It hasn't been optional for a while now.

Fixes:
checking for rrd.h... no
./configure: 25157: Syntax error: word unexpected (expecting ")")

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agobarometer plugin: cleanup whitespace
Ruben Kerkhof [Sun, 13 Dec 2015 12:07:05 +0000 (13:07 +0100)]
barometer plugin: cleanup whitespace

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agocollectd.conf(5): Document all metrics created by CollectInternalStats.
Florian Forster [Thu, 17 Dec 2015 09:26:02 +0000 (10:26 +0100)]
collectd.conf(5): Document all metrics created by CollectInternalStats.

8 years agocollectd.conf(5): Improve documentation of the CollectdInternalStats option.
Yves Mettier [Tue, 15 Dec 2015 09:55:17 +0000 (09:55 +0000)]
collectd.conf(5): Improve documentation of the CollectdInternalStats option.

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agoMerge branch 'pr/1469'
Florian Forster [Thu, 17 Dec 2015 09:09:28 +0000 (10:09 +0100)]
Merge branch 'pr/1469'

8 years agoMerge branch 'pr/1393'
Florian Forster [Thu, 17 Dec 2015 09:02:09 +0000 (10:02 +0100)]
Merge branch 'pr/1393'

8 years agodrbd plugin: no need to link with libpthread
Ruben Kerkhof [Sun, 13 Dec 2015 12:44:11 +0000 (13:44 +0100)]
drbd plugin: no need to link with libpthread

8 years agoMerge pull request #1466 from rubenk/write_riemann-remove-unneeded-include
Ruben Kerkhof [Sun, 13 Dec 2015 11:37:17 +0000 (12:37 +0100)]
Merge pull request #1466 from rubenk/write_riemann-remove-unneeded-include

write_riemann: remove unneeded include

8 years agoMerge pull request #1463 from rubenk/redis-fix-build-warning
Ruben Kerkhof [Sun, 13 Dec 2015 11:36:53 +0000 (12:36 +0100)]
Merge pull request #1463 from rubenk/redis-fix-build-warning

redis plugin: fix build error on NetBSD

8 years agowrite_riemann: remove unneeded include
Ruben Kerkhof [Sat, 12 Dec 2015 17:15:15 +0000 (18:15 +0100)]
write_riemann: remove unneeded include

Fixes build on NetBSD:

Making all in daemon
  CC       write_riemann_threshold.lo
write_riemann_threshold.c:36:18: fatal error: ltdl.h: No such file or directory
 #include <ltdl.h>
                  ^
compilation terminated.
*** Error code 1

Stop.
make[3]: stopped in /home/ruben/src/collectd/src
*** Error code 1

Stop.
make[2]: stopped in /home/ruben/src/collectd/src
*** Error code 1

Stop.
make[1]: stopped in /home/ruben/src/collectd/src
*** Error code 1

Stop.
make: stopped in /home/ruben/src/collectd

8 years agoredis plugin: fix build error on NetBSD
Ruben Kerkhof [Sat, 12 Dec 2015 14:32:23 +0000 (15:32 +0100)]
redis plugin: fix build error on NetBSD

Making all in daemon
  CC       redis_la-redis.lo
redis.c: In function 'redis_handle_info':
redis.c:307:5: error: array subscript has type 'char' [-Werror=char-subscripts]
     for(i=0;(*str && (isdigit(*str) || *str == '.'));i++,str++)
     ^
cc1: all warnings being treated as errors
*** Error code 1

Stop.
make[3]: stopped in /home/ruben/src/collectd/src
*** Error code 1

Stop.
make[2]: stopped in /home/ruben/src/collectd/src
*** Error code 1

Stop.
make[1]: stopped in /home/ruben/src/collectd/src
*** Error code 1

Stop.
make: stopped in /home/ruben/src/collectd

8 years agoMerge pull request #1462 from rubenk/email-plugin-fix-malloc-check
Ruben Kerkhof [Sat, 12 Dec 2015 13:44:52 +0000 (14:44 +0100)]
Merge pull request #1462 from rubenk/email-plugin-fix-malloc-check

email plugin: fix check for result of malloc

8 years agoemail plugin: fix check for result of malloc
Ruben Kerkhof [Sat, 12 Dec 2015 11:24:41 +0000 (12:24 +0100)]
email plugin: fix check for result of malloc

CID #38010

8 years agoMerge pull request #1461 from rubenk/fix-java-plugin-on-freebsd
Ruben Kerkhof [Sat, 12 Dec 2015 10:09:33 +0000 (11:09 +0100)]
Merge pull request #1461 from rubenk/fix-java-plugin-on-freebsd

java: link with libpthread on FreeBSD

8 years agojava: link with libpthread on FreeBSD
Ruben Kerkhof [Fri, 11 Dec 2015 22:43:18 +0000 (23:43 +0100)]
java: link with libpthread on FreeBSD

8 years agoMerge branch 'collectd-5.5'
Ruben Kerkhof [Fri, 11 Dec 2015 22:01:06 +0000 (23:01 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Ruben Kerkhof [Fri, 11 Dec 2015 20:56:40 +0000 (21:56 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoMerge pull request #1460 from rubenk/mark-lvm2app-linux-only
Ruben Kerkhof [Fri, 11 Dec 2015 20:43:15 +0000 (21:43 +0100)]
Merge pull request #1460 from rubenk/mark-lvm2app-linux-only

lvm2 plugin: mark as Linux only

8 years agoMerge pull request #1459 from rubenk/remove-unneccesary-check-for-ip-compat-h
Ruben Kerkhof [Fri, 11 Dec 2015 20:38:58 +0000 (21:38 +0100)]
Merge pull request #1459 from rubenk/remove-unneccesary-check-for-ip-compat-h

Remove check for ip_compat.h

8 years agoMerge pull request #1458 from rubenk/pthread-detection
Ruben Kerkhof [Fri, 11 Dec 2015 20:38:32 +0000 (21:38 +0100)]
Merge pull request #1458 from rubenk/pthread-detection

Pthread detection

8 years agoMerge pull request #1457 from rubenk/java-plugin-fixups
Ruben Kerkhof [Fri, 11 Dec 2015 20:38:06 +0000 (21:38 +0100)]
Merge pull request #1457 from rubenk/java-plugin-fixups

Java plugin fixups

8 years agoMerge pull request #1455 from rubenk/configure-ac-remove-dead-code
Ruben Kerkhof [Fri, 11 Dec 2015 20:37:41 +0000 (21:37 +0100)]
Merge pull request #1455 from rubenk/configure-ac-remove-dead-code

configure.ac: remove commented out check

8 years agoMerge pull request #1454 from rubenk/libi2c-dev-mark-as-linux-only
Ruben Kerkhof [Fri, 11 Dec 2015 20:37:22 +0000 (21:37 +0100)]
Merge pull request #1454 from rubenk/libi2c-dev-mark-as-linux-only

libi2c only exists on Linux

8 years agoMerge pull request #1453 from rubenk/configure-dont-output-pkgconfig-errors
Ruben Kerkhof [Fri, 11 Dec 2015 20:36:53 +0000 (21:36 +0100)]
Merge pull request #1453 from rubenk/configure-dont-output-pkgconfig-errors

libnotify: Don't output multiple lines of errors

8 years agoMerge pull request #1452 from rubenk/configure-silence-configure-check
Ruben Kerkhof [Fri, 11 Dec 2015 20:36:31 +0000 (21:36 +0100)]
Merge pull request #1452 from rubenk/configure-silence-configure-check

configure.ac: send output of check to /dev/null

8 years agoMerge pull request #1442 from rubenk/omnios-fix-make-check
Ruben Kerkhof [Fri, 11 Dec 2015 20:35:38 +0000 (21:35 +0100)]
Merge pull request #1442 from rubenk/omnios-fix-make-check

Fix make check on OmniOS

8 years agolvm2 plugin: mark as Linux only
Ruben Kerkhof [Fri, 11 Dec 2015 18:53:33 +0000 (19:53 +0100)]
lvm2 plugin: mark as Linux only

8 years agoMerge pull request #1456 from rubenk/onewire-fixup-flag-handling
Ruben Kerkhof [Fri, 11 Dec 2015 18:33:40 +0000 (19:33 +0100)]
Merge pull request #1456 from rubenk/onewire-fixup-flag-handling

onewire plugin: fixup flag handling

8 years agoRemove check for ip_compat.h
Ruben Kerkhof [Fri, 11 Dec 2015 18:26:38 +0000 (19:26 +0100)]
Remove check for ip_compat.h

Solaris needed this at one point but since
a621ced we check for ip6_ext without including this
header and that seems to succeed to.

8 years agoClarify error message
Ruben Kerkhof [Fri, 11 Dec 2015 18:19:31 +0000 (19:19 +0100)]
Clarify error message

8 years agoStop hardcoding -lpthread
Ruben Kerkhof [Fri, 11 Dec 2015 18:18:29 +0000 (19:18 +0100)]
Stop hardcoding -lpthread

8 years agoMove check for libpthread up
Ruben Kerkhof [Fri, 11 Dec 2015 18:08:59 +0000 (19:08 +0100)]
Move check for libpthread up

So we can use the result in plugins later on.

8 years agoJava plugin: allow setting JAVA_LIBS as well
Ruben Kerkhof [Fri, 11 Dec 2015 17:48:13 +0000 (18:48 +0100)]
Java plugin: allow setting JAVA_LIBS as well

8 years agoJava plugin: remove unused variables
Ruben Kerkhof [Fri, 11 Dec 2015 17:32:48 +0000 (18:32 +0100)]
Java plugin: remove unused variables

8 years agoJava plugin: clarify error message
Ruben Kerkhof [Fri, 11 Dec 2015 17:31:08 +0000 (18:31 +0100)]
Java plugin: clarify error message

It is possible that we've found libjvm, but it doesn't have
the right function.

8 years agoonewire plugin: fixup flag handling
Ruben Kerkhof [Fri, 11 Dec 2015 16:59:21 +0000 (17:59 +0100)]
onewire plugin: fixup flag handling

Split flags in _LDFLAGS and _LIBS
Allows the plugin to be detected and to be build on FreeBSD

8 years agoconfigure.ac: remove commented out check
Ruben Kerkhof [Fri, 11 Dec 2015 16:42:37 +0000 (17:42 +0100)]
configure.ac: remove commented out check

8 years agolibi2c only exists on Linux
Ruben Kerkhof [Fri, 11 Dec 2015 16:25:08 +0000 (17:25 +0100)]
libi2c only exists on Linux

8 years agolibnotify: Don't output multiple lines of errors
Ruben Kerkhof [Fri, 11 Dec 2015 16:08:44 +0000 (17:08 +0100)]
libnotify: Don't output multiple lines of errors

The errors pkg-config returns are not very helpful and they
break our nicely formatted list of found and absent libraries.

Just say that the package can't be found, like we do for the rest
of the packages we need.

8 years agoconfigure.ac: send output of check to /dev/null
Ruben Kerkhof [Fri, 11 Dec 2015 16:03:58 +0000 (17:03 +0100)]
configure.ac: send output of check to /dev/null

The output is quite a long line:
kern.cp_times: 10336 0 9848 499639 7613098 18834 0 11963 115 8101970 16444 0 14368 1672 8100398 17584 0 14149 1358 8099791

And we have no use for the result, we just want to know if the sysctl exists.

8 years agosrc/utils_ignorelist.c: Refactoring / code style fixes.
Florian Forster [Fri, 11 Dec 2015 08:18:27 +0000 (09:18 +0100)]
src/utils_ignorelist.c: Refactoring / code style fixes.

One of the goals was to remove uses of smalloc().

8 years agoswap plugin: don't exit when malloc fails
Ruben Kerkhof [Thu, 10 Dec 2015 18:38:04 +0000 (19:38 +0100)]
swap plugin: don't exit when malloc fails

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agosrc/daemon/utils_time.c: Rewrite format_zone() using strftime().
Florian Forster [Thu, 10 Dec 2015 09:45:11 +0000 (10:45 +0100)]
src/daemon/utils_time.c: Rewrite format_zone() using strftime().

The "extern long timezone", while specified by X/Open, is not available
on FreeBSD. There, timezone() is a function.

8 years ago.gitignore: Ignore all files starting with "test_".
Florian Forster [Wed, 9 Dec 2015 10:57:43 +0000 (11:57 +0100)]
.gitignore: Ignore all files starting with "test_".

8 years agoMerge branch 'collectd-5.5'
Florian Forster [Wed, 9 Dec 2015 08:54:09 +0000 (09:54 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Florian Forster [Wed, 9 Dec 2015 08:49:55 +0000 (09:49 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agocurl_json plugin: Rewrite logic to add a path to db->tree.
Florian Forster [Wed, 9 Dec 2015 08:44:24 +0000 (09:44 +0100)]
curl_json plugin: Rewrite logic to add a path to db->tree.

CID: 37991

8 years agocurl_xml plugin: Correctly free xpath object.
Florian Forster [Tue, 8 Dec 2015 15:56:52 +0000 (16:56 +0100)]
curl_xml plugin: Correctly free xpath object.

CID: 37993
Signed-off-by: Florian Forster <octo@collectd.org>
8 years agoMerge branch 'collectd-5.5'
Florian Forster [Tue, 8 Dec 2015 13:42:07 +0000 (14:42 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Florian Forster [Tue, 8 Dec 2015 13:39:07 +0000 (14:39 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoping plugin: Protect access to ping_thread_error.
Florian Forster [Tue, 8 Dec 2015 13:38:05 +0000 (14:38 +0100)]
ping plugin: Protect access to ping_thread_error.

This is primarily to make Coverity happy.

CID: 37976

8 years agoping plugin: Remove "static" from local variable.
Florian Forster [Tue, 8 Dec 2015 13:31:33 +0000 (14:31 +0100)]
ping plugin: Remove "static" from local variable.

This caused Coverity to see concurrency issues where there are none.

CID: 37934

8 years agorrdtool plugin: Improve handling of the "DataDir" option.
Florian Forster [Tue, 8 Dec 2015 13:22:54 +0000 (14:22 +0100)]
rrdtool plugin: Improve handling of the "DataDir" option.

CID: 37977

8 years agopython plugin: Check return value of cpy_unicode_or_bytes_to_string().
Florian Forster [Tue, 8 Dec 2015 12:54:17 +0000 (13:54 +0100)]
python plugin: Check return value of cpy_unicode_or_bytes_to_string().

CID: 37984

8 years agopython plugin: Check return value of malloc().
Florian Forster [Tue, 8 Dec 2015 12:44:28 +0000 (13:44 +0100)]
python plugin: Check return value of malloc().

CID: 37981, 37982, 37983

8 years agopython plugin: Fix memory leak.
Florian Forster [Tue, 8 Dec 2015 12:41:35 +0000 (13:41 +0100)]
python plugin: Fix memory leak.

The regiser_read / register_write functions assume a user_data_t*
pointing to static memory and will not store / free the pointer.

CID: 38002

8 years agotail plugin: Fix memory leak.
Florian Forster [Tue, 8 Dec 2015 12:14:47 +0000 (13:14 +0100)]
tail plugin: Fix memory leak.

CID: 38013

8 years agopostgresql plugin: Register a new user data pointer with udb_query_set_user_data...
Florian Forster [Tue, 8 Dec 2015 12:07:26 +0000 (13:07 +0100)]
postgresql plugin: Register a new user data pointer with udb_query_set_user_data() unconditionally.

CID: 38019

8 years agoemail plugin: Refactor the accept() loop.
Florian Forster [Tue, 8 Dec 2015 11:51:29 +0000 (12:51 +0100)]
email plugin: Refactor the accept() loop.

This removes the assumption that accept() returning a socket (success)
implies that errno is not equal to EINTR. This is probably a reasonable
assumption, but trips up Coverity may be a bit hard to read.

CID: 38009

8 years agoemail plugin: Free "connection" in error handling.
Florian Forster [Tue, 8 Dec 2015 10:56:09 +0000 (11:56 +0100)]
email plugin: Free "connection" in error handling.

CID: 38010

8 years agopostgresql plugin: Remove invalid free().
Florian Forster [Tue, 8 Dec 2015 10:49:56 +0000 (11:49 +0100)]
postgresql plugin: Remove invalid free().

CID: 37936

8 years agosrc/collectd-tg.c: Explicitly null-terminate string.
Florian Forster [Tue, 8 Dec 2015 10:46:09 +0000 (11:46 +0100)]
src/collectd-tg.c: Explicitly null-terminate string.

CID: 37937
Signed-off-by: Florian Forster <octo@collectd.org>
8 years agosrc/utils_format_json.c: Check return value of json_escape_string().
Florian Forster [Tue, 8 Dec 2015 10:30:38 +0000 (11:30 +0100)]
src/utils_format_json.c: Check return value of json_escape_string().

CID: 37946

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Florian Forster [Tue, 8 Dec 2015 10:33:46 +0000 (11:33 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agosrc/utils_format_json.c: Make sure "keys" is freed in all error paths.
Florian Forster [Tue, 8 Dec 2015 10:30:13 +0000 (11:30 +0100)]
src/utils_format_json.c: Make sure "keys" is freed in all error paths.

CID: 38008

8 years agocollectd, collectdmon: Store return value of open() and dup().
Florian Forster [Tue, 8 Dec 2015 10:14:28 +0000 (11:14 +0100)]
collectd, collectdmon: Store return value of open() and dup().

This is to make Coverity happy.

CID: 38011, 38012

8 years agoMerge remote-tracking branch 'github/pr/1437'
Florian Forster [Tue, 8 Dec 2015 09:44:13 +0000 (10:44 +0100)]
Merge remote-tracking branch 'github/pr/1437'

8 years agosrc/daemon/utils_time.h: Avoid incorrect rounding in CDTIME_T_TO_TIME{VAL,SPEC}.
Florian Forster [Tue, 8 Dec 2015 09:33:17 +0000 (10:33 +0100)]
src/daemon/utils_time.h: Avoid incorrect rounding in CDTIME_T_TO_TIME{VAL,SPEC}.

This change also partially expands CDTIME_T_TO_{US,NS} to avoid dead
code warnings in Coverity.

Fixes: #1446
CID: 37950, 37951, 37952, 37953, 37954, 41722

8 years agosrc/daemon/utils_time_test.c: Check the "tv_sec" field of struct time{val,spec}.
Florian Forster [Tue, 8 Dec 2015 09:32:40 +0000 (10:32 +0100)]
src/daemon/utils_time_test.c: Check the "tv_sec" field of struct time{val,spec}.

Also fixes an incorrect "expected" test value.

Issue: #1446