projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.5'
[collectd.git]
/
src
/
curl_json.c
diff --git
a/src/curl_json.c
b/src/curl_json.c
index
c14e0f8
..
510d9b6
100644
(file)
--- a/
src/curl_json.c
+++ b/
src/curl_json.c
@@
-28,7
+28,6
@@
#include "utils_avltree.h"
#include "utils_complain.h"
#include "utils_avltree.h"
#include "utils_complain.h"
-#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
#include <sys/types.h>
#include <sys/un.h>
@@
-503,6
+502,7
@@
static int cj_config_add_key (cj_t *db, /* {{{ */
{
ERROR ("curl_json plugin: cj_config: "
"Invalid key: %s", ci->key);
{
ERROR ("curl_json plugin: cj_config: "
"Invalid key: %s", ci->key);
+ cj_key_free (key);
return (-1);
}
return (-1);
}
@@
-562,7
+562,7
@@
static int cj_config_add_key (cj_t *db, /* {{{ */
if (*ptr == '/')
{
c_avl_tree_t *value;
if (*ptr == '/')
{
c_avl_tree_t *value;
-
in
t len;
+
size_
t len;
len = ptr-name;
if (len == 0)
len = ptr-name;
if (len == 0)
@@
-654,11
+654,9
@@
static int cj_init_curl (cj_t *db) /* {{{ */
if (db->timeout >= 0)
curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, (long) db->timeout);
else if (db->interval > 0)
if (db->timeout >= 0)
curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, (long) db->timeout);
else if (db->interval > 0)
- curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS,
- CDTIME_T_TO_MS(db->timeout));
+ curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, (long) CDTIME_T_TO_MS(db->timeout));
else
else
- curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS,
- CDTIME_T_TO_MS(plugin_get_interval()));
+ curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, (long) CDTIME_T_TO_MS(plugin_get_interval()));
#endif
return (0);
#endif
return (0);
@@
-696,6
+694,7
@@
static int cj_config_add_url (oconfig_item_t *ci) /* {{{ */
{
ERROR ("curl_json plugin: cj_config: "
"Invalid key: %s", ci->key);
{
ERROR ("curl_json plugin: cj_config: "
"Invalid key: %s", ci->key);
+ cj_free (db);
return (-1);
}
if (status != 0)
return (-1);
}
if (status != 0)