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
Merge pull request #1456 from rubenk/onewire-fixup-flag-handling
onewire plugin: fixup flag handling
onewire plugin: fixup flag handling
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/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
meta_data.c: check return value of md_entry_alloc
CID #37986
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37986
Signed-off-by: Florian Forster <octo@collectd.org>
iptables plugin: remove dead code
ip version is either IPv4 or IPv6
CID #37962
Signed-off-by: Florian Forster <octo@collectd.org>
ip version is either IPv4 or IPv6
CID #37962
Signed-off-by: Florian Forster <octo@collectd.org>
src/filter_chain.c: Refactor fc_process_chain() a wee bit.
src/filter_chain.c: Delete dead code.
CID: 37961
CID: 37961
src/common.c: Check arguments of parse_values().
CID: 37965
CID: 37965
libcollectdclient: Check return value of setsockopt().
Coverity CID 37944.
Signed-off-by: Florian Forster <octo@collectd.org>
Coverity CID 37944.
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
configure.ac: fix libjvm detection on OSX
Shared libraries have the extension .dylib instead of .so
Ideally we look at shrext_cmds from libtool to find the shared library
extension but this works too.
Signed-off-by: Florian Forster <octo@collectd.org>
Shared libraries have the extension .dylib instead of .so
Ideally we look at shrext_cmds from libtool to find the shared library
extension but this works too.
Signed-off-by: Florian Forster <octo@collectd.org>
unixsock: check return value of chmod
CID #37948
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37948
Signed-off-by: Florian Forster <octo@collectd.org>
zookeeper plugin: remove dead code
status cannot be 0 inside the loop
CID #37964
Signed-off-by: Florian Forster <octo@collectd.org>
status cannot be 0 inside the loop
CID #37964
Signed-off-by: Florian Forster <octo@collectd.org>
write_tsdb plugin: don't close a closed socket
CID #37979 and #37980
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37979 and #37980
Signed-off-by: Florian Forster <octo@collectd.org>
zfs-arc plugin: check return value of malloc
CID #37989
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37989
Signed-off-by: Florian Forster <octo@collectd.org>
bind plugin: plug small leak
CID #37992
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37992
Signed-off-by: Florian Forster <octo@collectd.org>
curl_xml plugin: plug a few leaks on error
CID #37993
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37993
Signed-off-by: Florian Forster <octo@collectd.org>
stats plugin: close fd on error
CID #37995
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37995
Signed-off-by: Florian Forster <octo@collectd.org>
utils_cache.c: plug leak on error
CID #38000
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38000
Signed-off-by: Florian Forster <octo@collectd.org>
Aggregration plugin: plug leak on error
CID #38005
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38005
Signed-off-by: Florian Forster <octo@collectd.org>
varnish plugin: fix two resource leaks on error
CID #42774
Signed-off-by: Florian Forster <octo@collectd.org>
CID #42774
Signed-off-by: Florian Forster <octo@collectd.org>
write_riemann plugin: plug leak on error
CID #37996
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37996
Signed-off-by: Florian Forster <octo@collectd.org>
libcollectdclient: free result of getaddrinfo
CID #37997
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37997
Signed-off-by: Florian Forster <octo@collectd.org>
write_sensu plugin: fix two resource leaks on error
CID #37999
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37999
Signed-off-by: Florian Forster <octo@collectd.org>
madwifi: make code a little bit clearer
buf2 is initialized to zero, readlink
will write at most sizeof(buf2) -1 bytes,
so the trailing null should not be overwritten.
Coverity doesn't see that, rewrite the code
differently so it does.
CID #38027
Signed-off-by: Florian Forster <octo@collectd.org>
buf2 is initialized to zero, readlink
will write at most sizeof(buf2) -1 bytes,
so the trailing null should not be overwritten.
Coverity doesn't see that, rewrite the code
differently so it does.
CID #38027
Signed-off-by: Florian Forster <octo@collectd.org>
mosquitto plugin: fixup flag handling
Split build flags in _LDFLAGS and _LIBS
Keep existing CPPFLAGS and LDFLAGS set from the command line.
This ensures we will pick up libmosquitto when running
./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib",
just like we do for other plugins.
Split build flags in _LDFLAGS and _LIBS
Keep existing CPPFLAGS and LDFLAGS set from the command line.
This ensures we will pick up libmosquitto when running
./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib",
just like we do for other plugins.
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
Pinba plugin: close fd on error
CID #38001
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38001
Signed-off-by: Florian Forster <octo@collectd.org>
Merge remote-tracking branch 'github/pr/1419'
configfile.c: close dir on error
CID #38006
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38006
Signed-off-by: Florian Forster <octo@collectd.org>
turbostat plugin: close fd on error
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
utils_fbhash.c: fix resource leak on error
CID #38014
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38014
Signed-off-by: Florian Forster <octo@collectd.org>
multimeter plugin: fix fd leak
If open returns 0 we leak fd.
CID #38016
Signed-off-by: Florian Forster <octo@collectd.org>
If open returns 0 we leak fd.
CID #38016
Signed-off-by: Florian Forster <octo@collectd.org>
Merge remote-tracking branch 'github/pr/1413'
postgresql plugin: don't exit on malloc failure
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
perl: Check for NULL before dereferencing
CID #38023
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38023
Signed-off-by: Florian Forster <octo@collectd.org>
table plugin: fix check for realloc
We were checking the wrong thing.
CID #38024
Signed-off-by: Florian Forster <octo@collectd.org>
We were checking the wrong thing.
CID #38024
Signed-off-by: Florian Forster <octo@collectd.org>
utils_mount.c: check for null before dereferencing
CID #38025
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38025
Signed-off-by: Florian Forster <octo@collectd.org>
utils_mount.c: check for null before dereferencing
CID #38025
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38025
Signed-off-by: Florian Forster <octo@collectd.org>
zfs_arc plugin: leave enough room for terminating null
CID #38028
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38028
Signed-off-by: Florian Forster <octo@collectd.org>
teamspeak2: fix potential use after close
If connecting to the last host fails, we exit the loop
with a closed fd, which we try to fdopen() later on.
CID #38038
Signed-off-by: Florian Forster <octo@collectd.org>
If connecting to the last host fails, we exit the loop
with a closed fd, which we try to fdopen() later on.
CID #38038
Signed-off-by: Florian Forster <octo@collectd.org>
Merge remote-tracking branch 'github/pr/1403'
processes plugin: plug leak on error
CID #38004
CID #38004
types_list.c: fix two resource leaks
CID #38017
CID #38017
Merge pull request #1404 from rubenk/libcollectdclient-fix-double-close
libcollectdclient: don't close socket twice
libcollectdclient: don't close socket twice