Many bugfixes - fixed warnings and compile errors

This commit is contained in:
2017-08-27 17:08:16 +02:00
parent eca544a421
commit a518a69d9a
6 changed files with 32 additions and 16 deletions

View File

@@ -1,8 +1,10 @@
#include "restcurl.h"
#include <curl/curl.h>
#include <string.h>
#include <stdlib.h>
#include "cJSON.h"
static struct url_data {
struct url_data {
size_t size;
char* data;
};
@@ -66,7 +68,7 @@ static char *handle_url(char *url) {
int getRestSensor(sensor *sensor) {
char url[25];
url = "http://";
strcpy(url, "http://");
strcat(url, sensor->ip);
char *data = handle_url(url);
if (data) {