From e0a6c6ae9fa0b9764274440c786483cb4bbc80f3 Mon Sep 17 00:00:00 2001 From: Dohyun Pyun Date: Sun, 16 Feb 2025 09:25:36 +0900 Subject: [PATCH] Revert "Get the default client if the address is NULL" This reverts commit 3bea15268a6dc1d1cb0dc3a2a7999508a5829419. Change-Id: I4357307f39f77b017009babd078109403de94a3f Signed-off-by: Dohyun Pyun --- include/bluetooth_private.h | 2 -- src/bluetooth-common.c | 8 ++------ src/bluetooth-gatt.c | 16 ---------------- 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/include/bluetooth_private.h b/include/bluetooth_private.h index 7e63ac7..c0e542c 100644 --- a/include/bluetooth_private.h +++ b/include/bluetooth_private.h @@ -883,8 +883,6 @@ bool _bt_gatt_is_legacy_client_mode(void); bt_gatt_client_h _bt_gatt_get_client(const char *remote_addr); -bt_gatt_client_h _bt_gatt_get_default_client(void); - const GSList* _bt_gatt_get_server_list(void); #ifdef TIZEN_GATT_CLIENT diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index 1998462..3d5fbf2 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -3173,12 +3173,8 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us device_addr = NULL; if (client == NULL) { - client = _bt_gatt_get_default_client(); - - if (client == NULL) { - BT_ERR("There is NO matched client"); - break; - } + BT_ERR("There is NO matched client"); + break; } if (service_change->change_type == BLUETOOTH_GATT_SERVICE_CHANGE_TYPE_ADD) { diff --git a/src/bluetooth-gatt.c b/src/bluetooth-gatt.c index 4ce8c32..28a9ec8 100644 --- a/src/bluetooth-gatt.c +++ b/src/bluetooth-gatt.c @@ -236,22 +236,6 @@ bt_gatt_client_h _bt_gatt_get_client(const char *remote_addr) return NULL; } -bt_gatt_client_h _bt_gatt_get_default_client(void) -{ - GSList *l; - - for (l = gatt_client_list; l; l = g_slist_next(l)) { - bt_gatt_client_s *client_s = l->data; - - if (client_s == NULL) - continue; - - return (bt_gatt_client_h)client_s; - } - - return NULL; -} - const GSList* _bt_gatt_get_server_list(void) { return gatt_server_list; -- 2.34.1