mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
update reserve.c from upstream git
This commit is contained in:
parent
c341010304
commit
ba3c7668a4
1 changed files with 12 additions and 1 deletions
|
|
@ -59,6 +59,8 @@ struct rd_device {
|
||||||
static const char introspection[] =
|
static const char introspection[] =
|
||||||
DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE
|
DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE
|
||||||
"<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\">"
|
" <interface name=\"org.freedesktop.ReserveDevice1\">"
|
||||||
" <method name=\"RequestRelease\">"
|
" <method name=\"RequestRelease\">"
|
||||||
" <arg name=\"priority\" type=\"i\" direction=\"in\"/>"
|
" <arg name=\"priority\" type=\"i\" direction=\"in\"/>"
|
||||||
|
|
@ -461,8 +463,17 @@ int rd_acquire(
|
||||||
if (!(reply = dbus_connection_send_with_reply_and_block(
|
if (!(reply = dbus_connection_send_with_reply_and_block(
|
||||||
d->connection,
|
d->connection,
|
||||||
m,
|
m,
|
||||||
-1,
|
5000, /* 5s */
|
||||||
error))) {
|
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;
|
r = -EIO;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue