summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-04-06 04:21:26 +0200
committerLennart Poettering <lennart@poettering.net>2009-04-06 04:21:26 +0200
commitdaa945aa324af5b71332a3cd07890d1cf3a1cb60 (patch)
tree9e0219c5f972dfe5242cd125051232b7dd359807 /src
parent4b521e5d24ef965345fcfe7ea1c63fbb4b687174 (diff)
don't fail device reservation if the D-Bus connection is dead
Diffstat (limited to 'src')
-rw-r--r--src/modules/reserve-wrap.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/modules/reserve-wrap.c b/src/modules/reserve-wrap.c
index 1927342b..02ff29be 100644
--- a/src/modules/reserve-wrap.c
+++ b/src/modules/reserve-wrap.c
@@ -23,6 +23,8 @@
#include <config.h>
#endif
+#include <errno.h>
+
#include <pulse/xmalloc.h>
#include <pulse/i18n.h>
@@ -127,8 +129,13 @@ pa_reserve_wrapper* pa_reserve_wrapper_get(pa_core *c, const char *device_name)
request_cb,
NULL)) < 0) {
- pa_log_error("Failed to acquire reservation lock on device '%s': %s", device_name, pa_cstrerror(-k));
- goto fail;
+ if (k == -EBUSY) {
+ pa_log_error("Device '%s' already locked.", device_name);
+ goto fail;
+ } else {
+ pa_log_warn("Failed to acquire reservation lock on device '%s': %s", device_name, pa_cstrerror(-k));
+ return r;
+ }
}
pa_log_debug("Successfully acquired reservation lock on device '%s'", device_name);