Provider selection algorithm
Bastien Nocera
hadess at hadess.net
Wed Jun 30 05:51:14 PDT 2010
On Tue, 2010-06-15 at 09:54 +0200, Javier Fernandez Garcia-Boente wrote:
> 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.
Could you please add your patch to bugzilla?
Cheers
More information about the GeoClue
mailing list