Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: [PATCH] service: Allow removing service in idle state
(Daniel Wagner)
2. [PATCH v2] service: Allow removing service in idle state
(Harish Jenny K N)
3. [PATCH v2] service: Allow removing service in idle state
(Harish Jenny K N)
----------------------------------------------------------------------
Message: 1
Date: Thu, 16 Mar 2017 22:06:39 +0100
From: Daniel Wagner <[email protected]>
To: Harish Jenny K N <[email protected]>, [email protected]
Subject: Re: [PATCH] service: Allow removing service in idle state
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi Harish,
On 03/15/2017 01:04 PM, Harish Jenny K N wrote:
> Currently only if the service state is CONNMAN_SERVICE_STATE_FAILURE,
> the service is allowed to be removed. This commit allows removing the
> service when service state is CONNMAN_SERVICE_STATE_IDLE and
> CONNMAN_SERVICE_STATE_DISCONNECT.
So far so good.
> This is needed for the following usecase:
> Connect to router with WEP encryption by issuing wrong passphrase
> (exactly matching the length of WEP passphrase of 5 or 13.
> Detected as wrong passphrase otherwise).
>
> $ connmanctl> connect <service>
> Passphrase = [ Type=wep, Requirement=mandatory ]
> Passphrase? <Enter 5 digit passphrase>
> $ connmanctl>
> Agent ReportError <service>
> connect-failed
>
> Connection is unsuccessful as wrong key is entered(expected behaviour).
> Again try to connect to the same router. But this time agent will not
> ask for passphrase.
> connman will never be able to connect to this router.
>
> Try with config <service> --remove option to remove stored passphrase.
> $ connmanctl> config <service> --remove
> Error <service>: Not supported
>
> In order to enter the right passphrase again while connecting we need
> the option to remove the service during is_idle(service->state).
Could you paraphrase the above into a few sentences? It is a bit too
specific.
And also you need to update the documentation in doc/service-api.txt.
See 6b9b0f04536b ("Allow service removal to clear failure state") where
the original condition was added.
Thanks,
Daniel
------------------------------
Message: 2
Date: Fri, 17 Mar 2017 12:42:20 +0530
From: Harish Jenny K N <[email protected]>
To: <[email protected]>
Subject: [PATCH v2] service: Allow removing service in idle state
Message-ID:
<[email protected]>
Content-Type: text/plain
Changes from v1:
- updated the documentation in doc/service-api.txt
- paraphrase the commit message.
Harish Jenny K N (1):
service: Allow removing service in idle state
doc/service-api.txt | 4 ++--
src/service.c | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
--
1.9.1
------------------------------
Message: 3
Date: Fri, 17 Mar 2017 12:42:21 +0530
From: Harish Jenny K N <[email protected]>
To: <[email protected]>
Subject: [PATCH v2] service: Allow removing service in idle state
Message-ID:
<[email protected]>
Content-Type: text/plain
Currently only if the service state is CONNMAN_SERVICE_STATE_FAILURE,
the service is allowed to be removed. This commit allows removing the
service when service state is CONNMAN_SERVICE_STATE_IDLE and
CONNMAN_SERVICE_STATE_DISCONNECT.
This is needed if a connection attempt fails and the service State is in
CONNMAN_SERVICE_STATE_IDLE or CONNMAN_SERVICE_STATE_DISCONNECT, Remove()
method can be used to reset the service to clear any wrong passphrase given.
Signed-off-by: Harish Jenny K N <[email protected]>
---
doc/service-api.txt | 4 ++--
src/service.c | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/doc/service-api.txt b/doc/service-api.txt
index e2e9e84..c3682e2 100644
--- a/doc/service-api.txt
+++ b/doc/service-api.txt
@@ -91,8 +91,8 @@ Methods dict GetProperties() [deprecated]
to false, but that is currently not supported.
In the case a connection attempt failed and the
- service is in the State=failure, this method can
- also be used to reset the service.
+ service is in the State=FAILURE|IDLE|DISCONNECT, this
+ method can also be used to reset the service.
Calling this method on Ethernet devices, hidden WiFi
services or provisioned services will cause an error
diff --git a/src/service.c b/src/service.c
index 0d08b5c..2289d54 100644
--- a/src/service.c
+++ b/src/service.c
@@ -4242,8 +4242,7 @@ bool __connman_service_remove(struct connman_service
*service)
__connman_provider_is_immutable(service->provider))
return false;
- if (!service->favorite && service->state !=
- CONNMAN_SERVICE_STATE_FAILURE)
+ if (!service->favorite && !is_idle(service->state))
return false;
__connman_service_disconnect(service);
--
1.9.1
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 17, Issue 16
***************************************