OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d143ba
)
audio: Handle error in gateway_request_stream()
author
Mikel Astiz
<mikel.astiz@bmw-carit.de>
Tue, 4 Sep 2012 11:15:56 +0000
(13:15 +0200)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Tue, 4 Sep 2012 12:50:55 +0000
(15:50 +0300)
gateway_request_stream() should check if the call to get_records() has
succeeded, and fail otherwise.
audio/gateway.c
patch
|
blob
|
history
diff --git
a/audio/gateway.c
b/audio/gateway.c
index
8603038
..
0603f12
100644
(file)
--- a/
audio/gateway.c
+++ b/
audio/gateway.c
@@
-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,