[linux] Delay claiming dbus name

Bug #289911 reported by Michael Terry
4
Affects Status Importance Assigned to Milestone
Moovida
Invalid
Medium
Unassigned
moovida (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Right now, elisa claims the well-known dbus name 'com.fluendo.Elisa' early on, in each plugin that uses dbus. It should only claim the name when the database is initialized.

This bug can be seen if you try to activate elisa via dbus (so elisa isn't running, you send dbus command, dbus starts elisa, elisa claims bus, dbus sends request to elisa). If elisa claims the bus too early, it may not be ready for the command and it will fail.

I'm attaching a patch that fixes this (I believe). I *think* that interface_initialized is the right place to put the dbus name grab.

To test, run the following command without elisa running:
dbus-send --print-reply --dest=com.fluendo.Elisa /com/fluendo/Elisa/Plugins/Database/Photo com.fluendo.Elisa.Plugins.Database.Photo.get_albums int32:0 int32:10

This should print a list of all your photo albums.

Revision history for this message
Michael Terry (mterry) wrote :
Olivier Tilloy (osomon)
Changed in elisa:
milestone: none → 0.5.x
Changed in elisa:
importance: Undecided → High
Olivier Tilloy (osomon)
Changed in elisa:
importance: High → Medium
milestone: 0.5.x → none
Revision history for this message
Olivier Tilloy (osomon) wrote :

I can't reproduce here, all I get is:

    Error org.freedesktop.DBus.Error.NoMemory: Launcher could not run (out of memory)

Anyway it would make sense to claim the bus name only once and store, maybe as an attribute of the application.
I can see one issue in claiming the bus name late: detecting whether an instance of Moovida is already running relies on dbus.

Changed in elisa:
status: New → Confirmed
summary: - Delay claiming dbus name
+ [linux] Delay claiming dbus name
Michael Terry (mterry)
tags: added: oem-services
tags: added: patch-forwarded-upstream
Revision history for this message
dino99 (9d9) wrote :

The latest free moovida 1.09 does not get any maintenance since a while. Now moovidadb.com is supporting Linux and support can be found at : http://www.fluendo.com/faq/

Changed in moovida (Ubuntu):
status: New → Invalid
Changed in moovida:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.