Commit graph

5 commits

Author SHA1 Message Date
Tanu Kaskinen
dd7cf7ad5e Call change_cb() only when there's an actual change.
Calling change_cb() whenever anything happens in the ownership of the
bus name caused trouble in PulseAudio in this scenario:

1. PulseAudio is using a device and owns the corresponding service
   name.
2. Another application requests device release.
3. PulseAudio releases the device.
4. Change in the bus name ownership: PulseAudio gives up the
   ownership, and nobody owns the name.
5. reserve-monitor notices that, and notifies PulseAudio.
6. Since reserve-monitor reports the device as "not busy", PulseAudio
   decides to reserve the bus name immediately back to itself and
   opens the device again.

The other application will forcibly take the bus name to itself, as
it should according to the protocol, but the other application may
have trouble opening the device if it tries to do that before
PulseAudio has had time to react to the NameLost signal.

This can be solved by not calling change_cb() if there are no changes
in the device busy status. In this scenario the device is considered
"not busy" while PulseAudio is owning the bus name, so PulseAudio gets
no notification when the ownership changes from PulseAudio to nobody.
2013-01-17 11:12:44 +01:00
Lennart Poettering
a69b729414 voltest: extend test to verify correctness of _multiply() and _divide() 2009-08-19 01:02:32 +02:00
Lennart Poettering
c579cb56e9 reserver: update from upstream git 2009-08-17 03:41:14 +02:00
Lennart Poettering
efdd3d054b reserve: update from upstream git repo 2009-07-01 20:20:36 +02:00
Lennart Poettering
3af5f8cb55 reserve: wrap device reservation monitor reference implementation 2009-06-05 19:03:16 +02:00