From: Marc Fournier Date: Tue, 3 Mar 2015 23:39:09 +0000 (+0100) Subject: Merge branch 'collectd-5.3' into collectd-5.4 X-Git-Tag: collectd-5.5.0~12^2~20 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=27aeac9988dde1d53e5df697ce0e1b8a951d091a;hp=add4647f5dbd0e0d3d0c95903c644f9dcafee33b;p=collectd.git Merge branch 'collectd-5.3' into collectd-5.4 Conflicts: configure.ac --- diff --git a/configure.ac b/configure.ac index be5dc72b..f370a863 100644 --- a/configure.ac +++ b/configure.ac @@ -5437,12 +5437,13 @@ Configuration: Libraries: intel mic . . . . . . $with_mic libaquaero5 . . . . . $with_libaquaero5 + libcredis . . . . . . $with_libcredis libcurl . . . . . . . $with_libcurl libdbi . . . . . . . $with_libdbi - libcredis . . . . . . $with_libcredis libesmtp . . . . . . $with_libesmtp libganglia . . . . . $with_libganglia libgcrypt . . . . . . $with_libgcrypt + libhal . . . . . . . $with_libhal libiokit . . . . . . $with_libiokit libiptc . . . . . . . $with_libiptc libjvm . . . . . . . $with_java @@ -5451,6 +5452,7 @@ Configuration: libmemcached . . . . $with_libmemcached libmnl . . . . . . . $with_libmnl libmodbus . . . . . . $with_libmodbus + libmongoc . . . . . . $with_libmongoc libmysql . . . . . . $with_libmysql libnetapp . . . . . . $with_libnetapp libnetsnmp . . . . . $with_libnetsnmp @@ -5458,6 +5460,7 @@ Configuration: liboconfig . . . . . $with_liboconfig libopenipmi . . . . . $with_libopenipmipthread liboping . . . . . . $with_liboping + libowcapi . . . . . . $with_libowcapi libpcap . . . . . . . $with_libpcap libperfstat . . . . . $with_perfstat libperl . . . . . . . $with_libperl @@ -5476,9 +5479,8 @@ Configuration: libxml2 . . . . . . . $with_libxml2 libxmms . . . . . . . $with_libxmms libyajl . . . . . . . $with_libyajl - libevent . . . . . . $with_libevent - protobuf-c . . . . . $have_protoc_c oracle . . . . . . . $with_oracle + protobuf-c . . . . . $have_protoc_c python . . . . . . . $with_python Features: diff --git a/src/plugin.c b/src/plugin.c index b60c04ba..cb1005e8 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -895,7 +895,6 @@ int plugin_load (char const *plugin_name, uint32_t flags) const char *dir; char filename[BUFSIZE] = ""; char typename[BUFSIZE]; - int typename_len; int ret; struct stat statbuf; struct dirent *de; @@ -935,7 +934,6 @@ int plugin_load (char const *plugin_name, uint32_t flags) WARNING ("plugin_load: Filename too long: \"%s.so\"", plugin_name); return (-1); } - typename_len = strlen (typename); if ((dh = opendir (dir)) == NULL) { @@ -947,7 +945,7 @@ int plugin_load (char const *plugin_name, uint32_t flags) while ((de = readdir (dh)) != NULL) { - if (strncasecmp (de->d_name, typename, typename_len)) + if (strcasecmp (de->d_name, typename)) continue; status = ssnprintf (filename, sizeof (filename), diff --git a/src/powerdns.c b/src/powerdns.c index a140a126..f3d40830 100644 --- a/src/powerdns.c +++ b/src/powerdns.c @@ -259,9 +259,6 @@ static void submit (const char *plugin_instance, /* {{{ */ if (strcmp (lookup_table[i].name, pdns_type) == 0) break; - if (lookup_table[i].type == NULL) - return; - if (i >= lookup_table_length) { INFO ("powerdns plugin: submit: Not found in lookup table: %s = %s;", @@ -269,6 +266,9 @@ static void submit (const char *plugin_instance, /* {{{ */ return; } + if (lookup_table[i].type == NULL) + return; + type = lookup_table[i].type; type_instance = lookup_table[i].type_instance;