From 1ff1d4e911ae00fcbb0b510c59b440f7b2fb13e4 Mon Sep 17 00:00:00 2001 From: Jakub Tyszkowski Date: Fri, 6 Jun 2014 15:46:22 +0200 Subject: [PATCH] android/gatt: Rename app unregister function Its used for client and server apps unregistering --- android/gatt.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/android/gatt.c b/android/gatt.c index 7d22901dc..558b203c8 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -1423,7 +1423,7 @@ static bool trigger_connection(struct app_connection *connection) return true; } -static uint8_t unregister_client(int client_if) +static uint8_t unregister_app(int client_if) { struct gatt_app *cl; @@ -1434,10 +1434,7 @@ static uint8_t unregister_client(int client_if) 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); @@ -1451,7 +1448,7 @@ static void handle_client_unregister(const void *buf, uint16_t len) 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); @@ -3577,7 +3574,7 @@ static void handle_client_test_command(const void *buf, uint16_t len) else status = HAL_STATUS_FAILED; } else { - status = unregister_client(test_client_if); + status = unregister_app(test_client_if); test_client_if = 0; } break; @@ -3643,7 +3640,7 @@ static void handle_server_unregister(const void *buf, uint16_t len) 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); -- 2.47.3