projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
apache plugin: Fix a segmentation fault in the config handling of VerifyPeer / Verify...
[collectd.git]
/
src
/
apache.c
diff --git
a/src/apache.c
b/src/apache.c
index
371e1d4
..
d6712dc
100644
(file)
--- a/
src/apache.c
+++ b/
src/apache.c
@@
-202,7
+202,7
@@
static int config_set_boolean (int *ret_boolean, /* {{{ */
return (-1);
}
return (-1);
}
- if (ci->values[0].type
!
= OCONFIG_TYPE_BOOLEAN)
+ if (ci->values[0].type
=
= OCONFIG_TYPE_BOOLEAN)
{
if (ci->values[0].value.boolean)
*ret_boolean = 1;
{
if (ci->values[0].value.boolean)
*ret_boolean = 1;
@@
-212,13
+212,9
@@
static int config_set_boolean (int *ret_boolean, /* {{{ */
else /* if (ci->values[0].type != OCONFIG_TYPE_STRING) */
{
char *string = ci->values[0].value.string;
else /* if (ci->values[0].type != OCONFIG_TYPE_STRING) */
{
char *string = ci->values[0].value.string;
- if ((strcasecmp ("true", string) == 0)
- || (strcasecmp ("yes", string) == 0)
- || (strcasecmp ("on", string) == 0))
+ if (IS_TRUE (string))
*ret_boolean = 1;
*ret_boolean = 1;
- else if ((strcasecmp ("false", string) == 0)
- || (strcasecmp ("no", string) == 0)
- || (strcasecmp ("off", string) == 0))
+ else if (IS_FALSE (string))
*ret_boolean = 0;
else
{
*ret_boolean = 0;
else
{
@@
-458,6
+454,7
@@
static int init_host (apache_t *st) /* {{{ */
}
curl_easy_setopt (st->curl, CURLOPT_URL, st->url);
}
curl_easy_setopt (st->curl, CURLOPT_URL, st->url);
+ curl_easy_setopt (st->curl, CURLOPT_FOLLOWLOCATION, 1);
if (st->verify_peer != 0)
{
if (st->verify_peer != 0)
{