author | Florian Forster <octo@huhu.verplant.org> | |
Wed, 15 Jul 2009 09:10:19 +0000 (11:10 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Wed, 15 Jul 2009 09:10:19 +0000 (11:10 +0200) |
Conflicts:
src/memcached.c
src/memcached.c
build.sh | patch | blob | history | |
src/configfile.c | patch | blob | history | |
src/cpu.c | patch | blob | history | |
src/memcached.c | patch | blob | history | |
src/utils_cache.c | patch | blob | history | |
version-gen.sh | patch | blob | history |
diff --git a/build.sh b/build.sh
index 804b2e2593b6d497e0a15dbd77f6a4e35343c446..20854b13b7d88cf6aa90f5ce990fd07370fff56c 100755 (executable)
--- a/build.sh
+++ b/build.sh
{
for PROG in "$@"
do
- if ! which "$PROG" >/dev/null 2>&1; then
+ which "$PROG" >/dev/null 2>&1
+ if test $? -ne 0; then
cat >&2 <<EOF
WARNING: \`$PROG' not found!
Please make sure that \`$PROG' is installed and is in one of the
diff --git a/src/configfile.c b/src/configfile.c
index 53f3314a31113f628f57abe2dc9c7a8a4035281d..d401a2e1e0e2998a1a965fa9b31acb2532106682 100644 (file)
--- a/src/configfile.c
+++ b/src/configfile.c
if (ci->children[i].children == NULL)
dispatch_value_plugin (name, ci->children + i);
else
- {DEBUG ("No nested config blocks allowed for this plugin.");}
+ {
+ WARNING ("There is a `%s' block within the "
+ "configuration for the %s plugin. "
+ "The plugin either only expects "
+ "\"simple\" configuration statements "
+ "or wasn't loaded using `LoadPlugin'."
+ " Please check your configuration.",
+ ci->children[i].key, name);
+ }
}
return (0);
diff --git a/src/cpu.c b/src/cpu.c
index 64ce5df9e27b8158942c70203ceb763a54f1bead..dc44a50ff5f71b732ae69a4be9ba64401b09d7e7 100644 (file)
--- a/src/cpu.c
+++ b/src/cpu.c
vl.values_len = 1;
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "cpu", sizeof (vl.plugin));
- ssnprintf (vl.plugin_instance, sizeof (vl.type_instance),
+ ssnprintf (vl.plugin_instance, sizeof (vl.plugin_instance),
"%i", cpu_num);
sstrncpy (vl.type, "cpu", sizeof (vl.type));
sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
diff --git a/src/memcached.c b/src/memcached.c
index 06cf2001b6287adb49b8843fc69994f962ae1c65..b3321578894d7e3ffc49a4a7126143ff0e3d2b87 100644 (file)
--- a/src/memcached.c
+++ b/src/memcached.c
port = MEMCACHED_DEF_PORT;
}
- if ((ai_return = getaddrinfo (host, port, NULL, &ai_list)) != 0) {
+ if ((ai_return = getaddrinfo (host, port, &ai_hints, &ai_list)) != 0) {
char errbuf[1024];
ERROR ("memcached: getaddrinfo (%s, %s): %s",
host, port,
diff --git a/src/utils_cache.c b/src/utils_cache.c
index 3cfe3a12c4965c915d94ca92d0cd312a355bdd0e..60d3283278e394dfd673029619cac16f7de64baf 100644 (file)
--- a/src/utils_cache.c
+++ b/src/utils_cache.c
sfree (keys[i]);
sfree (key);
cache_free (ce);
+ continue;
}
/* If we get here, the value is ``interesting''. Query the record from the
keys[i], status);
sfree (keys[i]);
}
+
+ /* Make really sure the next iteration doesn't work with this pointer.
+ * There have been too many bugs in the past.. :/ -- octo */
+ ce = NULL;
} /* for (keys[i]) */
c_avl_iterator_destroy (iter);
diff --git a/version-gen.sh b/version-gen.sh
index 6fcfb1e41e5bdb3aa46d138774c30dbdda31e70d..cfced9ecf8524b354925cf42c30d37842ad52450 100755 (executable)
--- a/version-gen.sh
+++ b/version-gen.sh
DEFAULT_VERSION="4.7.1.git"
-VERSION="$( git describe 2> /dev/null | sed -e 's/^collectd-//' )"
+VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`"
if test -z "$VERSION"; then
VERSION="$DEFAULT_VERSION"
fi
-VERSION=$( echo "$VERSION" | sed -e 's/-/./g' )
-
-echo -n $VERSION
+VERSION="`echo \"$VERSION\" | sed -e 's/-/./g'`"
+echo -n "$VERSION"