#include "bt-hal-utils.h"
#include "bt-hal-dbus-common-utils.h"
+#include "bt-hal-gatt.h"
#include "bt-hal-adapter-le.h"
#include "bt-hal-event-receiver.h"
** Static variables
************************************************************************************/
extern const btgatt_callbacks_t *bt_gatt_callbacks;
-guint owner_id;
-GDBusConnection *g_conn = NULL;
-//GDBusConnection *conn = NULL;
-GDBusNodeInfo *manager_node_info = NULL;
-guint manager_id;
+static guint owner_id;
+static GDBusConnection *g_conn = NULL;
+static GDBusNodeInfo *manager_node_info = NULL;
+static guint manager_id;
/* Global handles which needs to be incremented during each addition */
static int gatt_service_handle = 10;
static gboolean instance_id_used[BT_GATTS_MAX];
-#define CHECK_BTGATT_INIT() if (bt_gatt_callbacks == NULL)\
+#define CHECK_BTGATT_INIT() if (_bt_hal_gatt_interface_ready() == false)\
{\
ERR("%s: BTGATT not initialized", __FUNCTION__);\
return BT_STATUS_NOT_READY;\
owner_id = g_bus_own_name_on_connection(g_conn, name,
G_BUS_NAME_OWNER_FLAGS_NONE,
NULL, NULL, NULL, NULL);
+
+ g_free(name);
}
INFO("Owner ID [%d]", owner_id);
char *desc_flags[NUMBER_OF_FLAGS];
int flag_count = 0;
int *app_id;
-
hal_gatt_desc_added *user_data = NULL;
-#if 0
- if (new_char) {
- desc_id = 1;
- new_char = FALSE;
- }
-#endif
+
/* Fetch service data for the GATT server */
serv_info = __bt_gatt_find_gatt_service_info(slot, service_handle);
if (serv_info == NULL)
}
g_free(serv_path);
+ g_strfreev(line_argv);
+
line_argv = g_strsplit_set(char_path, "/", 0);
serv_path = g_strdup_printf("/%s/%s/%s", line_argv[1], line_argv[2], line_argv[3]);