Make audio_acquire() fail if audio_reservation_init() fails.
rd_acquire() is going to assert (or fail) anyway because connection will be NULL.
This commit is contained in:
parent
9d3524006a
commit
8f556dac4f
|
@ -71,8 +71,11 @@ SERVER_EXPORT bool audio_acquire(const char * device_name)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
// Open DBus connection first time
|
// Open DBus connection first time
|
||||||
if (gReserveCount == 0)
|
if (gReserveCount == 0) {
|
||||||
audio_reservation_init();
|
if (audio_reservation_init() != 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
assert(gReserveCount < DEVICE_MAX);
|
assert(gReserveCount < DEVICE_MAX);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue