On Fri, Aug 8, 2014 at 1:50 PM, Patrik Flykt
<[email protected]> wrote:
> A failed service that is reconnected has to be set to idle state before
> connecting it again. Changing state from failed to idle also has to be
> allowed. Unless this is done, a service already in failed state won't
> be able to detect that a subsequent reconnect also must re-trigger
> a new reconnect attempt in __connman_service_ipconfig_indicate_state()
> and service_indicate_state().
>
> Fixes CM-622
> ---
>  src/service.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/service.c b/src/service.c
> index 0108fab..6a42d48 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -5683,9 +5683,6 @@ int __connman_service_ipconfig_indicate_state(struct 
> connman_service *service,
>         switch (new_state) {
>         case CONNMAN_SERVICE_STATE_UNKNOWN:
>         case CONNMAN_SERVICE_STATE_IDLE:
> -               if (service->state == CONNMAN_SERVICE_STATE_FAILURE)
> -                       return -EINVAL;
> -               break;
>         case CONNMAN_SERVICE_STATE_ASSOCIATION:
>                 break;

This will also cause CONNMAN_SERVICE_STATE_UNKNOWN to fall through,
was that intended?


>         case CONNMAN_SERVICE_STATE_CONFIGURATION:
> @@ -5954,6 +5951,8 @@ int __connman_service_connect(struct connman_service 
> *service,
>         if (!is_ipconfig_usable(service))
>                 return -ENOLINK;
>
> +       __connman_service_clear_error(service);
> +
>         err = service_connect(service);
>
>         service->connect_reason = reason;
> --
> 1.9.1
>
> _______________________________________________
> connman mailing list
> [email protected]
> https://lists.connman.net/mailman/listinfo/connman
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to