GNOME Bugzilla – Bug 611532
geoclue plugin matches all devices having just SP
Last modified: 2010-03-02 10:55:40 UTC
In lib/plugins/geoclue.c the get_name_and_type function iterates the adapters, not the devices, because it calls bluetooth_client_get_model(), as a consequence it can't find the device and it returns a type value of 0 which later code interprets as BLUETOOTH_TYPE_ANY which is assumed to be a GPS. Easiest fix would be to use bluetooth_client_get_device_model() but passing the GtkTreeIter to has_config_widget() instead of address and uuids would make writing plugins easier.
The problem is that the iter depends on the model it's in. You can't have a GtkTreeIter represent anything other than a location in a GtkTreeModel, and it would be invalid as soon as you modify the tree. The best way would probably to have a helper function to get the properties of a particular device.
Created attachment 155020 [details] [review] Fix getting device properties in geoclue plugin
Attachment 155020 [details] pushed as 0df28fa - Fix getting device properties in geoclue plugin