bluez5: backend-native: don't send +BCS if no codec negotiation

Fix issue with sending +BCS for CVSD even though codec negotation is not
available for the RFCOMM.
This commit is contained in:
Pauli Virtanen 2021-06-20 19:28:27 +03:00
parent a19ab4a20a
commit b44fdf5ebb

View file

@ -1374,6 +1374,9 @@ static int backend_native_ensure_codec(void *data, struct spa_bt_device *device,
if (rfcomm == NULL)
return -ENOTSUP;
if (!rfcomm->codec_negotiation_supported)
return -ENOTSUP;
if (rfcomm->codec == codec) {
spa_bt_device_emit_codec_switched(device, 0);
return 0;