diff options
author | Emmanuel VAUTRIN <Emmanuel.VAUTRIN@cpexterne.org> | 2021-12-15 15:06:59 +0100 |
---|---|---|
committer | Daniel Wagner <wagi@monom.org> | 2022-01-23 14:22:34 +0100 |
commit | ed3e8b59e90f5a388fcb339d46e2e5dc7e29d099 (patch) | |
tree | cc1622fe01e4f70023e9f5241d14136425b5f87c | |
parent | cd1a578600e664e7960c779c62f45ee0c479054d (diff) | |
download | connman-ed3e8b59e90f5a388fcb339d46e2e5dc7e29d099.tar.gz |
service: Fix native connection with wrong passphrase
When a native connection fails with a wrong passphrase, the user still
needs to be informed, via the agent.
However, in this case, the associated service is automatically
disconnected, canceling the pending agent requests.
The invalid key error shall be reported before this cancellation.
Commit b9a0a039ccc5 ("service: Report errors to user in native mode")
-rw-r--r-- | src/service.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c index 9141b85d..1d2b78a6 100644 --- a/src/service.c +++ b/src/service.c @@ -6023,6 +6023,15 @@ static int service_indicate_state(struct connman_service *service) break; case CONNMAN_SERVICE_STATE_IDLE: + if (old_state == CONNMAN_SERVICE_STATE_FAILURE && + service->connect_reason == + CONNMAN_SERVICE_CONNECT_REASON_NATIVE && + service->error == + CONNMAN_SERVICE_ERROR_INVALID_KEY) { + __connman_service_clear_error(service); + service_complete(service); + } + if (old_state != CONNMAN_SERVICE_STATE_DISCONNECT) __connman_service_disconnect(service); |