Commit graph

7 commits

Author SHA1 Message Date
Mikel Astiz
58def1fd1d reserve: Fix leaking NameLost signals after release+acquire
The use of the pseudo-blocking D-Bus calls leads to the problem that
NameLost signals are received after the reply to ReleaseName().

The problem with this is that a later acquisition of the same audio
device can potentially receive the NameLost signal corresponding to
the previous instance, due to the fact that the signal hasn't been
popped from the D-Bus message queue.

The simplest approach to solve this problem is to poll the actual name
owner from the D-Bus daemon, in order to make sure that we did really
lose the name.

The proposal uses a blocking call to GetNameOwner to avoid incosistent
states in the internal APIs: it would otherwise be possible to have a
"busy" device before the reservation has been lost, in the unlikely
case if some other process acquires the name before we got the
confirmation that the NameLost was actually true.
2013-01-31 14:04:45 +02:00
Mikel Astiz
cb0f3d2878 reserve: Move get_name_owner() to the public rd_device API
The function is interesting for both rd_device and rd_monitor so make
it part of the rd_device public API to avoid duplicated code.

The decision to move the function to reserve.c is motivated by the fact
that other projects (i.e. jack) use reserve.c only. Therefore, adding a
reserve->reserve-monitor dependency should be avoided.
2013-01-31 13:56:25 +02:00
Lennart Poettering
a69b729414 voltest: extend test to verify correctness of _multiply() and _divide() 2009-08-19 01:02:32 +02:00
Lennart Poettering
efdd3d054b reserve: update from upstream git repo 2009-07-01 20:20:36 +02:00
Lennart Poettering
1748fd2a0d reserve: update reserve.[ch] from upstream git 2009-06-05 19:00:12 +02:00
Lennart Poettering
ba3c7668a4 update reserve.c from upstream git 2009-02-24 06:36:42 +01:00
Lennart Poettering
c341010304 implement device reservation scheme 2009-02-24 06:13:39 +01:00