diff --git a/android/gatt.c b/android/gatt.c
index 7d22901..558b203 100644
--- a/android/gatt.c
+++ b/android/gatt.c
return true;
}
-static uint8_t unregister_client(int client_if)
+static uint8_t unregister_app(int client_if)
{
struct gatt_app *cl;
return HAL_STATUS_FAILED;
}
- /*
- * Check if there is any connect request or connected device
- * for this client. If so, remove this client from those lists.
- */
+ /* Destroy app connections with proper notifications for this app. */
app_disconnect_devices(cl);
destroy_gatt_app(cl);
DBG("");
- status = unregister_client(cmd->client_if);
+ status = unregister_app(cmd->client_if);
ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_GATT,
HAL_OP_GATT_CLIENT_UNREGISTER, status);
else
status = HAL_STATUS_FAILED;
} else {
- status = unregister_client(test_client_if);
+ status = unregister_app(test_client_if);
test_client_if = 0;
}
break;
DBG("");
- status = unregister_client(cmd->server_if);
+ status = unregister_app(cmd->server_if);
ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_GATT,
HAL_OP_GATT_SERVER_UNREGISTER, status);