GNOME Bugzilla – Bug 693285
GDBusObjectManagerClient: won't emit object-added|removed if name-owner arrives later
Last modified: 2013-02-09 19:36:09 UTC
Created attachment 235343 [details] Test program So I've got this GDBusObjectManagerClient created with DO_NOT_AUTO_START. As soon as the manager is created I connect to 'object-added', 'object-removed' and 'notify::name-owner'. See attached example. If the process providing the well-known name exists BEFORE I create the client; i.e. if the client is created while the service is already there, then I always get 'object-added' and 'object-removed', even after restarts of the service. Example logs: [aleksander@ares Development]$ ./test-glib An object was removed An object was added An object was removed An object was removed ModemManager disappeared from bus ModemManager disappeared from bus ModemManager available in bus (:1.1096) An object was added An object was added An object was removed An object was removed ModemManager disappeared from bus But if the process providing the well-known name does NOT exist before; i.e. the client is created BEFORE the service is launched, then I never get the 'object-added' or 'object-removed' signals. [aleksander@ares Development]$ ./test-glib ModemManager disappeared from bus ModemManager available in bus (:1.1098) ModemManager disappeared from bus ModemManager disappeared from bus ModemManager available in bus (:1.1099)
Created attachment 235363 [details] [review] Patch for the issue Seems that we were only connecting to the control proxy 'g-signal' signal during initiable_init() when there already was a valid name-owner. With this patch we connect to the control proxy's 'g-signal' even when there is no direct name-owner available.
Review of attachment 235363 [details] [review]: Looks good to me.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.