[RFC 13/13] android/gatt: Postpone disconnect notifications sent to server apps

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

 



Bluedroid postpones server app disconnection callbacks until last
connection owner has disconnected instead of sending it when server app
calls disconnect.
---
 android/gatt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/gatt.c b/android/gatt.c
index 9607416..678d1b2 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -3725,7 +3725,7 @@ static void handle_server_disconnect(const void *buf, uint16_t len)
 
 	/* TODO: should we care to match also bdaddr when conn_id is unique? */
 	conn = find_connection_by_id(cmd->conn_id);
-	if (conn && conn->app->type == APP_SERVER)
+	if (conn && conn->owner && conn->app->type == APP_SERVER)
 		trigger_disconnection(conn);
 
 	status = HAL_STATUS_SUCCESS;
-- 
2.0.0

--
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