" </interface>"
"</node>";
+static void __bt_free_gatt_server_app(struct gatt_server_app *app)
+{
+ g_free(app->app_path);
+ g_free(app);
+}
+
+static void __bt_hal_gatt_free_service_info(struct gatt_service_info *svc_info)
+{
+ if (!svc_info)
+ return;
+
+ g_free(svc_info->serv_path);
+ g_free(svc_info->service_uuid);
+ g_free(svc_info);
+}
+
void _bt_hal_gatt_server_init(void)
{
assigned_id = 0;
memset(instance_id_used, 0x00, sizeof(instance_id_used));
+
+ g_slist_free_full(gatt_server_apps, (GDestroyNotify)__bt_free_gatt_server_app);
+ gatt_server_apps = NULL;
+
+ g_slist_free_full(gatt_services, (GDestroyNotify)__bt_hal_gatt_free_service_info);
+ gatt_services = NULL;
+
+ g_slist_free_full(hal_gatts_server_register_list, g_free);
+ hal_gatts_server_register_list = NULL;
}
static int __bt_hal_gatt_assign_id(void)
g_free(char_info);
}
-
-static void __bt_hal_gatt_free_service_info(struct gatt_service_info *svc_info)
-{
- if (!svc_info)
- return;
-
- g_free(svc_info->serv_path);
- g_free(svc_info->service_uuid);
- g_free(svc_info);
-}
-
static const GDBusInterfaceVTable desc_interface_vtable = {
__bt_gatt_desc_method_call,
NULL,