Hi Samuel
> Nice catch. Couldn't we fix that with that patch:
>
> diff --git a/src/service.c b/src/service.c
> index 626cd31..5c692df 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -306,6 +306,9 @@ static connman_bool_t is_connecting(struct
> connman_service *service)
> switch (service->state) {
> case CONNMAN_SERVICE_STATE_UNKNOWN:
> case CONNMAN_SERVICE_STATE_IDLE:
> + if (service->network == NULL)
> + return FALSE;
> + return __connman_network_get_connecting(service->network);
> case CONNMAN_SERVICE_STATE_FAILURE:
> case CONNMAN_SERVICE_STATE_DISCONNECT:
> case CONNMAN_SERVICE_STATE_READY:
>
We sill have a window, in __connman_network_connect
__connman_device_disconnect(network->device);
network->connecting = TRUE;
calling __connman_device_disconnect might result in sending
CONNMAN_SERVICE_STATE_IDLE which might call auto_connect
before we set network->connecting. we can maybe move
network->connecting = TRUE; before
__connman_device_disconnect(network->device); but then
we might endup trying to disconnect this network which wrong.
>
> > Also in __connman_service_auto_connect function we not want
> > to start connecting if another service is connected or in process,
> > since service_list does not sort connecting services we can
> > start connection while another service is already connecting.
> That's a perfectly valid issue, yes.
> However I think this needs to be fixed by actually sorting the services
> properly, i.e. by putting the connecting services right after the READY/ONLINE
> ones. Could you please come up with a separate patch for that ?
I can do that if it is ok, I thought sorting was done this way for
reason but if not I can sort connecting services, let me know if I can
do that.
Mohamed
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman