diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-02-24 06:36:42 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-02-24 06:36:42 +0100 |
commit | ba3c7668a472672bd86eb06dbbbffcef17722134 (patch) | |
tree | 4ada4bec833a744092c90f92bbe24db0ffa9cad0 /src | |
parent | c341010304064c9a6ae13fab15c7fa7883acaeeb (diff) | |
download | pulseaudio-ba3c7668a472672bd86eb06dbbbffcef17722134.tar.gz |
update reserve.c from upstream git
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/reserve.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/modules/reserve.c b/src/modules/reserve.c index 79ec97ac8..9a9591d25 100644 --- a/src/modules/reserve.c +++ b/src/modules/reserve.c @@ -59,6 +59,8 @@ struct rd_device { static const char introspection[] = DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE "<node>" + " <!-- If you are looking for documentation make sure to check out\n" + " http://git.0pointer.de/?p=reserve.git;a=blob;f=reserve.txt -->\n" " <interface name=\"org.freedesktop.ReserveDevice1\">" " <method name=\"RequestRelease\">" " <arg name=\"priority\" type=\"i\" direction=\"in\"/>" @@ -461,8 +463,17 @@ int rd_acquire( if (!(reply = dbus_connection_send_with_reply_and_block( d->connection, m, - -1, + 5000, /* 5s */ error))) { + + if (dbus_error_has_name(error, DBUS_ERROR_TIMED_OUT) || + dbus_error_has_name(error, DBUS_ERROR_UNKNOWN_METHOD) || + dbus_error_has_name(error, DBUS_ERROR_NO_REPLY)) { + /* This must be treated as denied. */ + r = -EBUSY; + goto fail; + } + r = -EIO; goto fail; } |