ConnMan network manager
 help / color / mirror / Atom feed
From: Christophe Ronco <c.ronco@kerlink.fr>
To: connman@lists.linux.dev
Cc: Christophe Ronco <c.ronco@kerlink.fr>
Subject: [PATCH 1/1] service: End connection if connection failure and no agent
Date: Tue, 20 Feb 2024 11:11:39 +0100	[thread overview]
Message-ID: <20240220101139.36171-2-c.ronco@kerlink.fr> (raw)
In-Reply-To: <20240220101139.36171-1-c.ronco@kerlink.fr>

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


      reply	other threads:[~2024-02-20 10:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 10:11 [PATCH 0/1] End connection if connection failure and no agent Christophe Ronco
2024-02-20 10:11 ` Christophe Ronco [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240220101139.36171-2-c.ronco@kerlink.fr \
    --to=c.ronco@kerlink.fr \
    --cc=connman@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).