summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikel Astiz <mikel.astiz@bmw-carit.de>2012-10-19 10:11:21 +0200
committerTanu Kaskinen <tanuk@iki.fi>2012-10-19 18:18:51 +0300
commit8b1236531efb7a485c6386888468db920cae6d99 (patch)
tree9d1a270299a902417d1fcdc7b1c3c151f3a861b6
parent97f2d6b347982eb2ffa9b1a14ae5ffd8a875f423 (diff)
downloadpulseaudio-8b1236531efb7a485c6386888468db920cae6d99.tar.gz
bluetooth: Use assertions when setting off profile
Setting the card profile to off cannot fail, therefore assertions can be used when calling pa_card_set_profile().
-rw-r--r--src/modules/bluetooth/module-bluetooth-device.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index d78ce8c5e..ee17fdeb9 100644
--- 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;
}
}