Ensure that only one browser-switchboard is active at any time
authorSteven Luo <steven+maemo@steven676.net>
Mon, 15 Feb 2010 07:26:16 +0000 (23:26 -0800)
committerSteven Luo <steven+maemo@steven676.net>
Mon, 15 Feb 2010 07:26:16 +0000 (23:26 -0800)
commit32801150ac9ad614f3d530cdc9200d4fd5d6964e
tree582edbf4cb073e680820bb01ec7962b8878af699
parenta712d8d7275b6229d75cab5549794183c9dae891
Ensure that only one browser-switchboard is active at any time

When launching MicroB, during the window between the time we let go of
com.nokia.osso_browser and the time MicroB picks it up, it's possible
that some process issues a request for the interface, which causes D-Bus
to attempt to start another copy of browser-switchboard; the results are
confusing at best and (in the Fremantle case) disastrous at worst.
Prevent this by trying to acquire the name
org.maemo.garage.browser-switchboard from D-Bus on startup, in a manner
that succeeds if and only if no one else already owns the name.

This is important because the Fremantle hildon-desktop appears to
sometimes insist on having a process to own com.nokia.osso_browser at
all times; when it decides this is necessary, it picks up our release of
the name and immediately asks D-Bus to launch another
browser-switchboard, which gets in the way of our MicroB launching
procedure.
main.c