[PATCH 01/16] android/gatt: Fix for device type in gatt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes remote device type in GATT cache, which should be
updated on connect confirm
---
 android/gatt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/android/gatt.c b/android/gatt.c
index ae310f7..aea0a9f 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -6115,8 +6115,6 @@ static void connect_confirm(GIOChannel *io, void *user_data)
 			error("gatt: Could not create device");
 			goto drop;
 		}
-
-		dev->bdaddr_type = dst_type;
 	} else {
 		if ((dev->state != DEVICE_DISCONNECTED) &&
 					!(dev->state == DEVICE_CONNECT_INIT &&
@@ -6130,6 +6128,8 @@ static void connect_confirm(GIOChannel *io, void *user_data)
 		}
 	}
 
+	dev->bdaddr_type = dst_type;
+
 	if (!bt_io_accept(io, connect_cb, device_ref(dev), NULL, NULL)) {
 		error("gatt: failed to accept connection");
 		device_unref(dev);
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux