Change-Id: Ib5badd216863f93a0776aedcd7b645e3ee9096e9
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
if (conn_info) {
BT_INFO("Remote GATT Server device [%s] is Connected", conn_info->addr);
connected = TRUE;
- } else
+ } else {
+ struct gatt_client_info_t *client_info = NULL;
+
BT_INFO("Remote GATT Server Device [%s] is not Connected", addr);
+
+ /* Check if device is already in connected list */
+ client_info = __bt_find_remote_gatt_client_info(addr);
+
+ if (client_info) {
+ BT_INFO("Remote Client device [%s] is Connected", client_info->addr);
+ connected = TRUE;
+ } else {
+ BT_INFO("Remote GATT Client Device [%s] is not Connected", addr);
+ }
+ }
+
g_free(addr);
return connected;
}