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
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
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
perl plugin: Check "return value" of PERL_GET_CONTEXT.
CID: 37985
CID: 37985
email plugin: Don't call type_list_incr() with type == NULL.
CID: 37988
CID: 37988
write_http plugin: Check return status of cf_util_get_*().
CID: 37949
CID: 37949
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
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
gmond plugin: Check return value of sendto(2).
CID: 38113
CID: 38113
gmond plugin: Check return value of setsockopt(2).
CID: 38112
CID: 38112
zfs_arc plugin: Rewrite Linux parsing logic.
CID: 38028
CID: 38028
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
zfs_arc plugin: Plug memory leak on Linux.
CID: 42796
Signed-off-by: Florian Forster <octo@collectd.org>
CID: 42796
Signed-off-by: Florian Forster <octo@collectd.org>
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>
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>
barometer plugin: cleanup whitespace
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
collectd.conf(5): Document all metrics created by CollectInternalStats.
collectd.conf(5): Improve documentation of the CollectdInternalStats option.
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'pr/1469'
Merge branch 'pr/1393'
drbd plugin: no need to link with libpthread
Merge pull request #1466 from rubenk/write_riemann-remove-unneeded-include
write_riemann: remove unneeded include
write_riemann: remove unneeded include
Merge pull request #1463 from rubenk/redis-fix-build-warning
redis plugin: fix build error on NetBSD
redis plugin: fix build error on NetBSD
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
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
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
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
Merge pull request #1462 from rubenk/email-plugin-fix-malloc-check
email plugin: fix check for result of malloc
email plugin: fix check for result of malloc
email plugin: fix check for result of malloc
CID #38010
CID #38010
Merge pull request #1461 from rubenk/fix-java-plugin-on-freebsd
java: link with libpthread on FreeBSD
java: link with libpthread on FreeBSD
java: link with libpthread on FreeBSD
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
Merge pull request #1460 from rubenk/mark-lvm2app-linux-only
lvm2 plugin: mark as Linux only
lvm2 plugin: mark as Linux only
Merge pull request #1459 from rubenk/remove-unneccesary-check-for-ip-compat-h
Remove check for ip_compat.h
Remove check for ip_compat.h
Merge pull request #1458 from rubenk/pthread-detection
Pthread detection
Pthread detection
Merge pull request #1457 from rubenk/java-plugin-fixups
Java plugin fixups
Java plugin fixups
Merge pull request #1455 from rubenk/configure-ac-remove-dead-code
configure.ac: remove commented out check
configure.ac: remove commented out check
Merge pull request #1454 from rubenk/libi2c-dev-mark-as-linux-only
libi2c only exists on Linux
libi2c only exists on Linux
Merge pull request #1453 from rubenk/configure-dont-output-pkgconfig-errors
libnotify: Don't output multiple lines of errors
libnotify: Don't output multiple lines of errors
Merge pull request #1452 from rubenk/configure-silence-configure-check
configure.ac: send output of check to /dev/null
configure.ac: send output of check to /dev/null
Merge pull request #1442 from rubenk/omnios-fix-make-check
Fix make check on OmniOS
Fix make check on OmniOS
lvm2 plugin: mark as Linux only
Merge pull request #1456 from rubenk/onewire-fixup-flag-handling
onewire plugin: fixup flag handling
onewire plugin: fixup flag handling
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.
Solaris needed this at one point but since
a621ced we check for ip6_ext without including this
header and that seems to succeed to.
Clarify error message
Stop hardcoding -lpthread
Move check for libpthread up
So we can use the result in plugins later on.
So we can use the result in plugins later on.
Java plugin: allow setting JAVA_LIBS as well
Java plugin: remove unused variables
Java plugin: clarify error message
It is possible that we've found libjvm, but it doesn't have
the right function.
It is possible that we've found libjvm, but it doesn't have
the right function.
onewire plugin: fixup flag handling
Split flags in _LDFLAGS and _LIBS
Allows the plugin to be detected and to be build on FreeBSD
Split flags in _LDFLAGS and _LIBS
Allows the plugin to be detected and to be build on FreeBSD
configure.ac: remove commented out check
libi2c only exists on Linux
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.
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.
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.
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.
src/utils_ignorelist.c: Refactoring / code style fixes.
One of the goals was to remove uses of smalloc().
One of the goals was to remove uses of smalloc().
swap plugin: don't exit when malloc fails
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
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.
The "extern long timezone", while specified by X/Open, is not available
on FreeBSD. There, timezone() is a function.
.gitignore: Ignore all files starting with "test_".
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
curl_json plugin: Rewrite logic to add a path to db->tree.
CID: 37991
CID: 37991
curl_xml plugin: Correctly free xpath object.
CID: 37993
Signed-off-by: Florian Forster <octo@collectd.org>
CID: 37993
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
ping plugin: Protect access to ping_thread_error.
This is primarily to make Coverity happy.
CID: 37976
This is primarily to make Coverity happy.
CID: 37976
ping plugin: Remove "static" from local variable.
This caused Coverity to see concurrency issues where there are none.
CID: 37934
This caused Coverity to see concurrency issues where there are none.
CID: 37934
rrdtool plugin: Improve handling of the "DataDir" option.
CID: 37977
CID: 37977
python plugin: Check return value of cpy_unicode_or_bytes_to_string().
CID: 37984
CID: 37984
python plugin: Check return value of malloc().
CID: 37981, 37982, 37983
CID: 37981, 37982, 37983
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
The regiser_read / register_write functions assume a user_data_t*
pointing to static memory and will not store / free the pointer.
CID: 38002
tail plugin: Fix memory leak.
CID: 38013
CID: 38013
postgresql plugin: Register a new user data pointer with udb_query_set_user_data() unconditionally.
CID: 38019
CID: 38019
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
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
email plugin: Free "connection" in error handling.
CID: 38010
CID: 38010
postgresql plugin: Remove invalid free().
CID: 37936
CID: 37936
src/collectd-tg.c: Explicitly null-terminate string.
CID: 37937
Signed-off-by: Florian Forster <octo@collectd.org>
CID: 37937
Signed-off-by: Florian Forster <octo@collectd.org>
src/utils_format_json.c: Check return value of json_escape_string().
CID: 37946
CID: 37946
Merge branch 'collectd-5.4' into collectd-5.5
src/utils_format_json.c: Make sure "keys" is freed in all error paths.
CID: 38008
CID: 38008
collectd, collectdmon: Store return value of open() and dup().
This is to make Coverity happy.
CID: 38011, 38012
This is to make Coverity happy.
CID: 38011, 38012
Merge remote-tracking branch 'github/pr/1437'
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
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
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
Also fixes an incorrect "expected" test value.
Issue: #1446
Merge remote-tracking branch 'github/pr/1440'
sigrok plugin: don't pass status to strerror
CID #38120
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38120
Signed-off-by: Florian Forster <octo@collectd.org>
Merge remote-tracking branch 'github/pr/1438'
interface plugin: Fix review comments.
Issue: #1416
Issue: #1416
interface plugin: Add UniqueName config property.
Issue: #1416
Issue: #1416
interface plugin: Fix duplicate interface metrics for Solaris.
Issue: #1416
Issue: #1416
Merge branch 'collectd-5.5'
Merge remote-tracking branch 'collectd/collectd-5.4' into collectd-5.5
Merge pull request #1441 from chicha/fix-gitignore
.gitignore: ignore test_plugin_ceph
.gitignore: ignore test_plugin_ceph
Fix make check on OmniOS
We need the defines from config.h before
we include <testing.h>, or we get the following error on OmniOS:
make test_common test_meta_data test_utils_avltree test_utils_heap test_utils_time test_utils_subst
gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DPREFIX='"/opt/collectd"' -DCONFIGFILE='"/opt/collectd/etc/collectd.conf"' -DLOCALSTATEDIR='"/opt/collectd/var"' -DPKGLOCALSTATEDIR='"/opt/collectd/var/lib/collectd"' -DPIDFILE='"/opt/collectd/var/run/collectd.pid"' -DPLUGINDIR='"/opt/collectd/lib/collectd"' -DPKGDATADIR='"/opt/collectd/share/collectd"' -Wall -Werror -g -O2 -c -o common_test.o common_test.c
In file included from collectd.h:31:0,
from common.h:31,
from common_test.c:28:
../../src/config.h:1631:0: error: "_FILE_OFFSET_BITS" redefined [-Werror]
#define _FILE_OFFSET_BITS 64
^
In file included from /usr/include/inttypes.h:41:0,
from ../../src/testing.h:30,
from common_test.c:27:
/opt/gcc-5.1.0/lib/gcc/i386-pc-solaris2.11/5.1.0/include-fixed/sys/feature_tests.h:231:0: note: this is the location of the previous definition
#define _FILE_OFFSET_BITS 32
^
cc1: all warnings being treated as errors
*** Error code 1
make: Fatal error: Command failed for target `common_test.o'
We need the defines from config.h before
we include <testing.h>, or we get the following error on OmniOS:
make test_common test_meta_data test_utils_avltree test_utils_heap test_utils_time test_utils_subst
gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DPREFIX='"/opt/collectd"' -DCONFIGFILE='"/opt/collectd/etc/collectd.conf"' -DLOCALSTATEDIR='"/opt/collectd/var"' -DPKGLOCALSTATEDIR='"/opt/collectd/var/lib/collectd"' -DPIDFILE='"/opt/collectd/var/run/collectd.pid"' -DPLUGINDIR='"/opt/collectd/lib/collectd"' -DPKGDATADIR='"/opt/collectd/share/collectd"' -Wall -Werror -g -O2 -c -o common_test.o common_test.c
In file included from collectd.h:31:0,
from common.h:31,
from common_test.c:28:
../../src/config.h:1631:0: error: "_FILE_OFFSET_BITS" redefined [-Werror]
#define _FILE_OFFSET_BITS 64
^
In file included from /usr/include/inttypes.h:41:0,
from ../../src/testing.h:30,
from common_test.c:27:
/opt/gcc-5.1.0/lib/gcc/i386-pc-solaris2.11/5.1.0/include-fixed/sys/feature_tests.h:231:0: note: this is the location of the previous definition
#define _FILE_OFFSET_BITS 32
^
cc1: all warnings being treated as errors
*** Error code 1
make: Fatal error: Command failed for target `common_test.o'
.gitignore: ignore test_plugin_ceph
write_kafka: fix two leaks on error
CID #38124
CID #38124
iptables plugin: indent consistently
iptables plugin: move comment to right place
multimeter plugin: Initizliaze "struct termios".
CID: 38036
CID: 38036
configure.ac: fix previous change to detect libjvm
This worked on OSX but failed on Linux.
Signed-off-by: Florian Forster <octo@collectd.org>
This worked on OSX but failed on Linux.
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5