Bug 28743

Summary: No provider selection algorithm implemented in the Master server.
Product: GeoClue Reporter: Javier Fernández <jfernandez>
Component: Master Server (obsolete)Assignee: Geoclue Bugs <geoclue-bugs>
Status: RESOLVED WONTFIX QA Contact: Geoclue Bugs <geoclue-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: First version of a provider selection algorith.
First version of the provider selection algorithm patch.
Provider selection algorithm.

Description Javier Fernández 2010-06-24 10:08:51 UTC
Created attachment 36465 [details]
First version of a provider selection algorith.

I've been playing a bit with the Master provider and i noticed that the
providers selection algorithm is still unimplemented. Currently, if i've
understood the code, the first available provider is always selected:

/* TODO: currently returning even providers that are worse than
priv->min_accuracy, if nothing else is available */ 
if (gc_master_provider_get_status (provider) ==GEOCLUE_STATUS_AVAILABLE)
{ 
        /* unsubscribe from all providers worse than this */
        gc_master_client_unsubscribe_providers (client,l->next,iface);  
        return provider;
}

I think this shouldn't be a problem, but if im not wrong, it always
selects the manual provider, which is always available. I guess it would
depend on the order of the providers list reading operation, but i've
experimented that most of times the manual provider is selected, even if
the Localnet, for instance, is also available.

I've implemented a patch, not very tested yet, trying to face this
problem. I would like to get some feedback about this issue, since i
guess is a well known problem and perhaps you already had some
alternative approaches.
Comment 1 Javier Fernández 2010-08-11 13:58:31 UTC
Created attachment 37799 [details] [review]
First version of the provider selection algorithm patch.

Adapted to the last changes in the master branch.
Comment 2 Bastien Nocera 2010-08-11 15:06:56 UTC
(In reply to comment #1)
> Created an attachment (id=37799) [details]
> First version of a connman support patch.
> 
> Adapted to the last changes in the master branch.

Why is that here instead of in a new bug?
Comment 3 Javier Fernández 2010-08-12 00:40:57 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Created an attachment (id=37799) [details] [details]
> > First version of a connman support patch.
> > 
> > Adapted to the last changes in the master branch.
> 
> Why is that here instead of in a new bug?

Sorry, wrong patch description. Fixed.
Comment 4 Javier Fernández 2010-08-23 05:12:46 UTC
Created attachment 38093 [details] [review]
Provider selection algorithm.

Final version of the provider selection algorithm.
Comment 5 Zeeshan Ali 2013-09-09 14:50:15 UTC
Closing all bugs on old geoclue. If your bug still applies to new geoclue, please do re-open, I really don't have time to go through each and every bug and evaluate separately. :( Apologies for any inconvenience caused by this change.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.