Diff between 32c5ba75d555107728beb07ba67439ea2d88fb73 and 50e8846d155d2e19842d69626369b0b5f7992cec

Changed Files

File Additions Deletions Status
android/gatt.c +8 -0 modified

Full Patch

diff --git a/android/gatt.c b/android/gatt.c
index f315764..89aca16 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -3445,6 +3445,7 @@ failed:
 static void handle_client_test_command(const void *buf, uint16_t len)
 {
 	const struct hal_cmd_gatt_client_test_command *cmd = buf;
+	struct gatt_app *app;
 	bdaddr_t bdaddr;
 	bt_uuid_t uuid;
 	uint8_t status;
@@ -3475,6 +3476,13 @@ static void handle_client_test_command(const void *buf, uint16_t len)
 		status = handle_connect(test_client_if, &bdaddr);
 		break;
 	case GATT_CLIENT_TEST_CMD_DISCONNECT:
+		app = queue_find(gatt_apps, match_app_by_id,
+						INT_TO_PTR(test_client_if));
+		if (app)
+			app_disconnect_devices(app);
+
+		status = HAL_STATUS_SUCCESS;
+		break;
 	case GATT_CLIENT_TEST_CMD_DISCOVER:
 	case GATT_CLIENT_TEST_CMD_PAIRING_CONFIG:
 	default: