projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
network plugin: Don't access values in an already freed array.
[collectd.git]
/
src
/
apache.c
diff --git
a/src/apache.c
b/src/apache.c
index
371e1d4
..
ebf245c
100644
(file)
--- a/
src/apache.c
+++ b/
src/apache.c
@@
-458,6
+458,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)
{
@@
-688,7
+689,8
@@
static int apache_read_host (user_data_t *user_data) /* {{{ */
{
if (strcmp (fields[0], "Scoreboard:") == 0)
submit_scoreboard (fields[1], st);
{
if (strcmp (fields[0], "Scoreboard:") == 0)
submit_scoreboard (fields[1], st);
- else if (strcmp (fields[0], "BusyServers:") == 0)
+ else if ((strcmp (fields[0], "BusyServers:") == 0) /* Apache 1.* */
+ || (strcmp (fields[0], "BusyWorkers:") == 0) /* Apache 2.* */)
submit_gauge ("apache_connections", NULL, atol (fields[1]), st);
}
}
submit_gauge ("apache_connections", NULL, atol (fields[1]), st);
}
}