projects
/
platform
/
upstream
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97f2d6b
)
bluetooth: Use assertions when setting off profile
author
Mikel Astiz
<mikel.astiz@bmw-carit.de>
Fri, 19 Oct 2012 08:11:21 +0000
(10:11 +0200)
committer
Tanu Kaskinen
<tanuk@iki.fi>
Fri, 19 Oct 2012 15:18:51 +0000
(18:18 +0300)
Setting the card profile to off cannot fail, therefore assertions can be
used when calling pa_card_set_profile().
src/modules/bluetooth/module-bluetooth-device.c
patch
|
blob
|
history
diff --git
a/src/modules/bluetooth/module-bluetooth-device.c
b/src/modules/bluetooth/module-bluetooth-device.c
index
d78ce8c
..
ee17fde
100644
(file)
--- a/
src/modules/bluetooth/module-bluetooth-device.c
+++ b/
src/modules/bluetooth/module-bluetooth-device.c
@@
-605,8
+605,7
@@
static int device_process_msg(pa_msgobject *obj, int code, void *data, int64_t o
pa_log_debug("Switching the profile to off due to IO thread failure.");
- if (pa_card_set_profile(u->card, "off", FALSE) < 0)
- pa_log_debug("Failed to switch profile to off");
+ pa_assert_se(pa_card_set_profile(u->card, "off", false) >= 0);
break;
}
}