mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-28 22:54:14 +08:00
audio: Handle error in gateway_request_stream()
gateway_request_stream() should check if the call to get_records() has succeeded, and fail otherwise.
This commit is contained in:
parent
5d143ba35e
commit
1ab43f63d4
@ -846,9 +846,10 @@ unsigned int gateway_request_stream(struct audio_device *dev,
|
||||
GError *err = NULL;
|
||||
GIOChannel *io;
|
||||
|
||||
if (!gw->rfcomm)
|
||||
get_records(dev);
|
||||
else if (!gw->sco) {
|
||||
if (!gw->rfcomm) {
|
||||
if (get_records(dev) < 0)
|
||||
return 0;
|
||||
} else if (!gw->sco) {
|
||||
io = bt_io_connect(sco_connect_cb, dev, NULL, &err,
|
||||
BT_IO_OPT_SOURCE_BDADDR, &dev->src,
|
||||
BT_IO_OPT_DEST_BDADDR, &dev->dst,
|
||||
|
Loading…
Reference in New Issue
Block a user