return ret;
}
-static struct psensor *json_object_to_psensor(json_object * o,
+static struct psensor *json_object_to_psensor(json_object *o,
const char *sensors_url,
int values_max_length)
{
- json_object *oid;
- json_object *oname;
- json_object *otype;
+ json_object *oid, *oname, *otype;
struct psensor *s;
- char *eid;
- char *url;
+ char *eid, *url;
oid = json_object_object_get(o, "id");
oname = json_object_object_get(o, "name");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cbk_curl);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
+ log_printf(LOG_DEBUG, "HTTP request %s", url);
if (curl_easy_perform(curl) == CURLE_OK)
obj = json_tokener_parse(chunk.data);
else