[PATCH 1/1] service: End connection if connection failure and no agent
Christophe Ronco <[email protected]>
| Newsgroups | dev.linux.lists.connman |
|---|---|
| Message-ID | <[email protected]> |
Immediately call service_complete in case of connection failure and no
connman agent.
---
src/service.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/service.c b/src/service.c
index f3e022c9..805cfca7 100644
--- a/src/service.c
+++ b/src/service.c
@@ -9189,12 +9189,14 @@ static int service_indicate_state(struct connman_service *service)
case CONNMAN_SERVICE_STATE_FAILURE:
if (service->connect_reason == CONNMAN_SERVICE_CONNECT_REASON_USER ||
service->connect_reason == CONNMAN_SERVICE_CONNECT_REASON_NATIVE) {
- connman_agent_report_error(service, service->path,
+ result = connman_agent_report_error(service,
+ service->path,
error2string(service->error),
report_error_cb,
get_dbus_sender(service),
NULL);
- goto notifier;
+ if (result == -EINPROGRESS)
+ goto notifier;
}
service_complete(service);
break;
--
2.25.1