ConnMan network manager
 help / color / mirror / Atom feed
From: Grant Erickson <gerickson@nuovations.com>
To: connman@lists.linux.dev
Subject: [PATCH] Leverage 'connman_service_get_identifier' in DBG calls.
Date: Thu, 19 Oct 2023 13:47:07 -0700	[thread overview]
Message-ID: <524C84BA-DC40-4292-A8DE-BA45E9E18DA6@nuovations.com> (raw)

This leverages 'connman_service_get_identifier' in DBG calls rather
than re-creating the same logic from 'connman_service_get_identifier'
in those same calls.

---
 src/service.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/service.c b/src/service.c
index 06d02322..955504b8 100644
--- a/src/service.c
+++ b/src/service.c
@@ -4358,7 +4358,7 @@ static gboolean run_vpn_auto_connect(gpointer data) {
 		is_connected(def_service->state))) {
 
 		DBG("stopped, default service %s connected %d",
-			def_service ? def_service->identifier : "NULL",
+			connman_service_get_identifier(def_service),
 			def_service ? is_connected(def_service->state) : -1);
 		goto out;
 	}
@@ -6483,8 +6483,7 @@ int __connman_service_ipconfig_indicate_state(struct connman_service *service,
 		return -EALREADY;
 
 	DBG("service %p (%s) old state %d (%s) new state %d (%s) type %d (%s)",
-		service, service ? service->identifier : NULL,
+		service, connman_service_get_identifier(service),
 		old_state, state2string(old_state),
 		new_state, state2string(new_state),
 		type, __connman_ipconfig_type2string(type));
-- 
2.32.0

             reply	other threads:[~2023-10-19 20:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19 20:47 Grant Erickson [this message]
2023-11-01 23:10 ` [PATCH v2] Leverage 'connman_service_get_identifier' in DBG calls Grant Erickson
2023-11-07 15:34   ` Marcel Holtmann

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=524C84BA-DC40-4292-A8DE-BA45E9E18DA6@nuovations.com \
    --to=gerickson@nuovations.com \
    --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).