Many bugfixes - fixed warnings and compile errors
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user