author | Ruben Kerkhof <ruben@tilaa.nl> | |
Fri, 26 Feb 2016 17:05:18 +0000 (18:05 +0100) | ||
committer | Ruben Kerkhof <ruben@tilaa.nl> | |
Fri, 26 Feb 2016 17:05:18 +0000 (18:05 +0100) |
Fix typo in collectd.conf
diff --git a/src/apache.c b/src/apache.c
index 13c8db66801291fb05cac46171ce089e14175e47..ee062206516463371539228c56912db04461f85f 100644 (file)
--- a/src/apache.c
+++ b/src/apache.c
st = user_data->data;
+ int status;
+
+ char *content_type;
+ static const char *text_plain = "text/plain";
+
assert (st->url != NULL);
/* (Assured by `config_add') */
if (st->curl == NULL)
{
- int status;
-
status = init_host (st);
if (status != 0)
return (-1);
st->server_type = APACHE;
}
+ status = curl_easy_getinfo (st->curl, CURLINFO_CONTENT_TYPE, &content_type);
+ if ((status == CURLE_OK) && (content_type != NULL) &&
+ (strncasecmp (content_type, text_plain, strlen (text_plain)) != 0))
+ {
+ WARNING ("apache plugin: `Content-Type' response header is not `%s' "
+ "(received: `%s'). Expecting unparseable data. Please check `URL' "
+ "parameter (missing `?auto' suffix ?)",
+ text_plain, content_type);
+ }
+
ptr = st->apache_buffer;
saveptr = NULL;
while ((line = strtok_r (ptr, "\n\r", &saveptr)) != NULL)
diff --git a/src/modbus.c b/src/modbus.c
index b5d1e251960534be10793aeb7c44000d16acb225..7349dc564976b2a91aa44b7bb760e8d33a9bf4e0 100644 (file)
--- a/src/modbus.c
+++ b/src/modbus.c
if (host == NULL)
return (EINVAL);
+#if COLLECT_DEBUG
modbus_set_debug (&host->connection, 1);
+#endif
/* We'll do the error handling ourselves. */
modbus_set_error_handling (&host->connection, NOP_ON_ERROR);
return (-1);
}
+#if COLLECT_DEBUG
modbus_set_debug (host->connection, 1);
+#endif
/* We'll do the error handling ourselves. */
modbus_set_error_recovery (host->connection, 0);
diff --git a/src/utils_ignorelist.c b/src/utils_ignorelist.c
index c6ddf0e60310106cd190aede3a1954e390ee4ccf..0828c55f3c82eba852083b5cc08d49a72b65c0df 100644 (file)
--- a/src/utils_ignorelist.c
+++ b/src/utils_ignorelist.c
* ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public Licence for more details.
*
- * You should have received a copy of the GNU General Public
- * Licence along with this program; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- * USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
* Lubos Stanek <lubek at users.sourceforge.net>
diff --git a/src/utils_ignorelist.h b/src/utils_ignorelist.h
index b47b55adb0a10ea4840e0143806b3d5e29e7bba3..db7535fdf97a3688915d022f7f58d5476bf2b903 100644 (file)
--- a/src/utils_ignorelist.h
+++ b/src/utils_ignorelist.h
* ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public Licence for more details.
*
- * You should have received a copy of the GNU General Public
- * Licence along with this program; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- * USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
* Lubos Stanek <lubek at users.sourceforge.net>
diff --git a/src/utils_llist.c b/src/utils_llist.c
index 11f838d248f6ab799c53654569f683af07db6d2d..4c5645b1cba12461c7811cc12c9b6e52a6e2c1da 100644 (file)
--- a/src/utils_llist.c
+++ b/src/utils_llist.c
* ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public Licence for more details.
*
- * You should have received a copy of the GNU General Public
- * Licence along with this program; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- * USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
* Florian Forster <octo at verplant.org>
diff --git a/src/utils_llist.h b/src/utils_llist.h
index 19d8d947bd66b94acead4079856a558107186f13..6214190fb3dbe8490fd1066e229c4e7ace2c66dd 100644 (file)
--- a/src/utils_llist.h
+++ b/src/utils_llist.h
* ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public Licence for more details.
*
- * You should have received a copy of the GNU General Public
- * Licence along with this program; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- * USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
* Florian Forster <octo at verplant.org>
diff --git a/src/utils_mount.c b/src/utils_mount.c
index 7b4c9276b876d23bd8eb578bc152489579fdc7d3..05bc1a144069d04c8559150aa15a4afa76852f80 100644 (file)
--- a/src/utils_mount.c
+++ b/src/utils_mount.c
* ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public Licence for more details.
*
- * You should have received a copy of the GNU General Public
- * Licence along with this program; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- * USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author:
* Niki W. Waibel <niki.waibel@gmx.net>
diff --git a/src/utils_mount.h b/src/utils_mount.h
index 83f789be9cd3acdf7f5535cb2e41ed035e3cbc2b..ef0bf75912bbf9941848ad1b1d52addc2963805e 100644 (file)
--- a/src/utils_mount.h
+++ b/src/utils_mount.h
* ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public Licence for more details.
*
- * You should have received a copy of the GNU General Public
- * Licence along with this program; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- * USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author:
* Niki W. Waibel <niki.waibel@gmx.net>