Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b4746ef authored by Charlie Boutier's avatar Charlie Boutier Committed by Gerrit Code Review
Browse files

Merge changes I8ddbdda7,I2126f127

* changes:
  SMP: Remove the fixed channel if the incoming SMP packet is discard.
  PandoraServer: Disconnect all profiles in disconnectLE
parents d648413d db342c1c
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -333,10 +333,6 @@ class Host(
        TRANSPORT_BREDR -> {
          Log.i(TAG, "disconnect BR_EDR")
          bluetoothDevice.disconnect()
          flow
            .filter { it.action == BluetoothDevice.ACTION_ACL_DISCONNECTED }
            .filter { it.getBluetoothDeviceExtra() == bluetoothDevice }
            .first()
        }
        TRANSPORT_LE -> {
          Log.i(TAG, "disconnect LE")
@@ -354,14 +350,18 @@ class Host(
            throw Status.UNKNOWN.asException()
          }

          bluetoothDevice.disconnect()
          gattInstance.disconnectInstance()
          gattInstance.waitForState(BluetoothProfile.STATE_DISCONNECTED)
        }
        else -> {
          Log.e(TAG, "Device type UNKNOWN")
          throw Status.UNKNOWN.asException()
        }
      }
      flow
        .filter { it.action == BluetoothDevice.ACTION_ACL_DISCONNECTED }
        .filter { it.getBluetoothDeviceExtra() == bluetoothDevice }
        .first()

      Empty.getDefaultInstance()
    }
+2 −0
Original line number Diff line number Diff line
@@ -215,6 +215,8 @@ static void smp_data_received(uint16_t channel, const RawAddress& bd_addr,
    tSMP_INT_DATA smp_int_data;
    smp_int_data.p_data = p;
    smp_sm_event(p_cb, static_cast<tSMP_EVENT>(cmd), &smp_int_data);
  } else {
    L2CA_RemoveFixedChnl(channel, bd_addr);
  }

  osi_free(p_buf);