projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1856 from rubenk/snmp-dont-dispatch-values-with-empty-type-instance
[collectd.git]
/
src
/
curl.c
diff --git
a/src/curl.c
b/src/curl.c
index
6377780
..
8d7baa5
100644
(file)
--- a/
src/curl.c
+++ b/
src/curl.c
@@
-22,6
+22,7
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "configfile.h"
#include "common.h"
#include "plugin.h"
#include "configfile.h"
@@
-269,7
+270,6
@@
static int cc_config_add_match (web_page_t *page, /* {{{ */
{
web_match_t *match;
int status;
{
web_match_t *match;
int status;
- int i;
if (ci->values_num != 0)
{
if (ci->values_num != 0)
{
@@
-284,7
+284,7
@@
static int cc_config_add_match (web_page_t *page, /* {{{ */
}
status = 0;
}
status = 0;
- for (i = 0; i < ci->children_num; i++)
+ for (i
nt i
= 0; i < ci->children_num; i++)
{
oconfig_item_t *child = ci->children + i;
{
oconfig_item_t *child = ci->children + i;
@@
-341,7
+341,7
@@
static int cc_config_add_match (web_page_t *page, /* {{{ */
match->dstype);
if (match->match == NULL)
{
match->dstype);
if (match->match == NULL)
{
- ERROR ("curl plugin:
tail_match_add_match
_simple failed.");
+ ERROR ("curl plugin:
match_create
_simple failed.");
cc_web_match_free (match);
return (-1);
}
cc_web_match_free (match);
return (-1);
}
@@
-433,7
+433,6
@@
static int cc_config_add_page (oconfig_item_t *ci) /* {{{ */
{
web_page_t *page;
int status;
{
web_page_t *page;
int status;
- int i;
if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_STRING))
{
if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_STRING))
{
@@
-468,7
+467,7
@@
static int cc_config_add_page (oconfig_item_t *ci) /* {{{ */
/* Process all children */
status = 0;
/* Process all children */
status = 0;
- for (i = 0; i < ci->children_num; i++)
+ for (i
nt i
= 0; i < ci->children_num; i++)
{
oconfig_item_t *child = ci->children + i;
{
oconfig_item_t *child = ci->children + i;
@@
-566,12
+565,11
@@
static int cc_config (oconfig_item_t *ci) /* {{{ */
int success;
int errors;
int status;
int success;
int errors;
int status;
- int i;
success = 0;
errors = 0;
success = 0;
errors = 0;
- for (i = 0; i < ci->children_num; i++)
+ for (i
nt i
= 0; i < ci->children_num; i++)
{
oconfig_item_t *child = ci->children + i;
{
oconfig_item_t *child = ci->children + i;
@@
-667,7
+665,6
@@
static void cc_submit_response_time (const web_page_t *wp, /* {{{ */
static int cc_read_page (web_page_t *wp) /* {{{ */
{
static int cc_read_page (web_page_t *wp) /* {{{ */
{
- web_match_t *wm;
int status;
cdtime_t start = 0;
int status;
cdtime_t start = 0;
@@
-686,7
+683,7
@@
static int cc_read_page (web_page_t *wp) /* {{{ */
if (wp->response_time)
cc_submit_response_time (wp, cdtime() - start);
if (wp->stats != NULL)
if (wp->response_time)
cc_submit_response_time (wp, cdtime() - start);
if (wp->stats != NULL)
- curl_stats_dispatch (wp->stats, wp->curl, hostname_g, "curl", wp->instance
, NULL
);
+ curl_stats_dispatch (wp->stats, wp->curl, hostname_g, "curl", wp->instance);
if(wp->response_code)
{
if(wp->response_code)
{
@@
-700,7
+697,7
@@
static int cc_read_page (web_page_t *wp) /* {{{ */
}
}
}
}
- for (wm = wp->matches; wm != NULL; wm = wm->next)
+ for (w
eb_match_t *w
m = wp->matches; wm != NULL; wm = wm->next)
{
cu_match_value_t *mv;
{
cu_match_value_t *mv;
@@
-727,9
+724,7
@@
static int cc_read_page (web_page_t *wp) /* {{{ */
static int cc_read (void) /* {{{ */
{
static int cc_read (void) /* {{{ */
{
- web_page_t *wp;
-
- for (wp = pages_g; wp != NULL; wp = wp->next)
+ for (web_page_t *wp = pages_g; wp != NULL; wp = wp->next)
cc_read_page (wp);
return (0);
cc_read_page (wp);
return (0);