#include <gio/gio.h>
#include <gio/gunixsocketaddress.h>
#include <app_common.h>
+#include <json.h>
#include "log-private.h"
#include "things-service.h"
#include "common-app-inf.h"
ret_if(!a_obj);
obj = json_object_new_object();
- retv_if(!obj);
+ ret_if(!obj);
- time_o = json_object_new_int64(tb_int->time);
+ time_o = json_object_new_int64(tb_int->i_time);
goto_if(!time_o, ERROR);
json_object_object_add(obj, "x", time_o);
struct json_object *value_o = NULL;
struct json_object *time_o = NULL;
- ret_if(!tb_int);
+ ret_if(!tb_double);
ret_if(!a_obj);
obj = json_object_new_object();
- retv_if(!obj, NULL);
+ ret_if(!obj);
- time_o = json_object_new_int64(tb_double->time);
+ time_o = json_object_new_int64(tb_double->i_time);
goto_if(!time_o, ERROR);
json_object_object_add(obj, "x", time_o);
struct json_object *obj = NULL;
struct json_object *a_obj = NULL;
char *json_str = NULL;
- int i = 0;
- GList *temp_l = NULL;
retv_if(!tb_data, NULL);
retvm_if(!((tb_data->type == TS_VALUE_TYPE_INT) ||
break;
default:
_E("invalid type [%d]", tb_data->type);
- goto ERROR:
+ goto ERROR;
break;
}
{
ret_if(!tb_data);
- t_data = g_try_malloc0(sizeof(timebased_data));
- if (!t_data)
- return NULL;
-
- if (t_data->v_list)
+ if (tb_data->v_list)
g_list_free_full(tb_data->v_list, __timebase_value_free);
g_free(tb_data);