After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790797 - Agent bug fixes
Agent bug fixes
Status: RESOLVED FIXED
Product: gnome-bluetooth
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-bluetooth-general-maint@gnome.bugs
gnome-bluetooth-general-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2017-11-24 17:15 UTC by Bastien Nocera
Modified: 2017-11-26 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
lib: Ignore "org.bluez.Error.DoesNotExist" error when unregistering (1.87 KB, patch)
2017-11-24 17:15 UTC, Bastien Nocera
committed Details | Review
lib: Use GDBusConnection rather than for_bus variants (3.56 KB, patch)
2017-11-24 17:15 UTC, Bastien Nocera
committed Details | Review
lib: Fix agent registration when bluetoothd comes and goes (3.64 KB, patch)
2017-11-24 17:15 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2017-11-24 17:15:06 UTC
.
Comment 1 Bastien Nocera 2017-11-24 17:15:23 UTC
Created attachment 364346 [details] [review]
lib: Ignore "org.bluez.Error.DoesNotExist" error when unregistering

That means that the agent was never registered. You could achieve this
by:
- bluetoothd is running, launch an agent
- kill and restart bluetoothd
- kill the agent
- unregister() fails with:
Agent unregistration failed: GDBus.Error:org.bluez.Error.DoesNotExist: Does Not Exist 'g-io-error-quark'
Comment 2 Bastien Nocera 2017-11-24 17:15:28 UTC
Created attachment 364347 [details] [review]
lib: Use GDBusConnection rather than for_bus variants

We already have a GDBusConnection in our private struct, so we don't
need to use "for_bus" variants.
Comment 3 Bastien Nocera 2017-11-24 17:15:33 UTC
Created attachment 364348 [details] [review]
lib: Fix agent registration when bluetoothd comes and goes

Use our watch for org.bluez appearing and vanishing to register our
agent. There's no need to try and call out to org.bluez if the daemon
isn't around. We'll register when both org.bluez is set, and _register()
has been called.
Comment 4 Benjamin Berg 2017-11-24 22:00:09 UTC
Review of attachment 364346 [details] [review]:

Looks good
Comment 5 Benjamin Berg 2017-11-24 22:00:43 UTC
Review of attachment 364347 [details] [review]:

Makes sense
Comment 6 Benjamin Berg 2017-11-24 22:01:26 UTC
Review of attachment 364348 [details] [review]:

Cool, might fix some weird issues.
Comment 7 Bastien Nocera 2017-11-26 16:16:03 UTC
Attachment 364346 [details] pushed as 2c6d78c - lib: Ignore "org.bluez.Error.DoesNotExist" error when unregistering
Attachment 364347 [details] pushed as 5423ea0 - lib: Use GDBusConnection rather than for_bus variants
Attachment 364348 [details] pushed as 491f454 - lib: Fix agent registration when bluetoothd comes and goes