Revert "Get the default client if the address is NULL" 02/319702/1 accepted/tizen/unified/20250226.044801 accepted/tizen/unified/x/20250226.132029
authorDohyun Pyun <dh79.pyun@samsung.com>
Sun, 16 Feb 2025 00:25:36 +0000 (09:25 +0900)
committerDohyun Pyun <dh79.pyun@samsung.com>
Sun, 16 Feb 2025 00:26:29 +0000 (09:26 +0900)
This reverts commit 3bea15268a6dc1d1cb0dc3a2a7999508a5829419.

Change-Id: I4357307f39f77b017009babd078109403de94a3f
Signed-off-by: Dohyun Pyun <dh79.pyun@samsung.com>
include/bluetooth_private.h
src/bluetooth-common.c
src/bluetooth-gatt.c

index 7e63ac7fc3e08c2bd09c548b549b129574648f1f..c0e542c1aac3821d986a8e82c8490e34dcab4573 100644 (file)
@@ -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
index 1998462fbc07fae627e0d69259d1b2f4167ec8df..3d5fbf233866bf55ced544b3746785e6e3a1ee35 100644 (file)
@@ -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) {
index 4ce8c324bfb94a3ebcd151b79a15e3eeaacffc6e..28a9ec87d10a6a0b5a5569d6a23e19c0bf86ef92 100644 (file)
@@ -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;