From 0bd0d2891875100042c5f6f956e0ec43bc6301ef Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 15 Dec 2021 09:20:50 +0100 Subject: [PATCH] pbap_client: support disconnect while operation is ongoing --- src/classic/pbap_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classic/pbap_client.c b/src/classic/pbap_client.c index 37715117d..df11d2b50 100644 --- a/src/classic/pbap_client.c +++ b/src/classic/pbap_client.c @@ -1166,7 +1166,7 @@ uint8_t pbap_connect(btstack_packet_handler_t handler, bd_addr_t addr, uint16_t uint8_t pbap_disconnect(uint16_t pbap_cid){ UNUSED(pbap_cid); - if (pbap_client->state != PBAP_CONNECTED){ + if (pbap_client->state < PBAP_CONNECTED){ return BTSTACK_BUSY; } pbap_client->state = PBAP_W2_SEND_DISCONNECT_REQUEST;