OSDN Git Service

AVRCP: Flush the command queue in AVRC_Close
authorMyles Watson <mylesgw@google.com>
Tue, 12 Dec 2017 00:23:21 +0000 (16:23 -0800)
committerMyles Watson <mylesgw@google.com>
Tue, 12 Dec 2017 19:39:40 +0000 (19:39 +0000)
Test: toggle BR/EDR, manually inspect open files using lsof
Change-Id: I7bdc3a3840e7cc31894a9050dd5b7c29f863bb30

stack/avrc/avrc_api.cc

index f3126b3..f209522 100644 (file)
@@ -1014,6 +1014,7 @@ uint16_t AVRC_Open(uint8_t* p_handle, tAVRC_CONN_CB* p_ccb,
  *****************************************************************************/
 uint16_t AVRC_Close(uint8_t handle) {
   AVRC_TRACE_DEBUG("%s handle:%d", __func__, handle);
+  avrc_flush_cmd_q(handle);
   return AVCT_RemoveConn(handle);
 }