Skip to contentSkip to conversation

Add Service Identifier to a Couple of 'DBG' Statements

PATCH In review Grant Erickson 2 participants 4 messages Dec 20, 2023 – Dec 23, 2023

lore
Share & tools
lore
#0 lore raw

cover Add Service Identifier to a Couple of 'DBG' Statements

This adds the service identifier to the 'DBG' statements in timeserver.c:'ts_reset' and session.c:'service_state_changed' to aid debugging in a multi-technology environment with "EnableOnlineToReadyTransition" asserted and for consistency with other DBG statements in other modules.

Grant Erickson (2):
session: Add service identifier to 'DBG' in 'service_state_changed'.
timeserver: Add service identifier to 'DBG' in 'ts_reset'.

 src/session.c    | 4 +++-
 src/timeserver.c | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.42.0
#1 lore raw

PATCH 1/2 session: Add service identifier to 'DBG' in 'service_state_changed'.

This adds the service identifier to the 'DBG' statement in 'service_state_changed' to aid debugging in a multi-technology environment with "EnableOnlineToReadyTransition" asserted and for consistency with other 'DBG' statements in other modules.

---
 src/session.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
src/session.c +3 -1
index eeefe3f28b3c..bef4b833a3cb 100644
@@ -1937,7 +1937,9 @@ static void service_state_changed(struct connman_service *service,
 {
 	struct connman_service_info *info;
 
-	DBG("service %p state %d", service, state);
+	DBG("service %p (%s) state %d",
+		service, connman_service_get_identifier(service),
+		state);
 
 	info = g_hash_table_lookup(service_hash, service);
 
Signature · 1 line
2.42.0
#2 lore raw

PATCH 2/2 timeserver: Add service identifier to 'DBG' in 'ts_reset'.

In reply to Grant Erickson

This adds the service identifier to the 'DBG' statement in 'ts_reset' to aid debugging in a multi-technology environment with "EnableOnlineToReadyTransition" asserted and for consistency with other 'DBG' statements in other modules.

---
 src/timeserver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/timeserver.c +2 -1
index 3eb718aa1568..d364f72870c8 100644
@@ -417,7 +417,8 @@ static void ts_set_nameservers(const struct connman_service *service)
  */
 static void ts_reset(struct connman_service *service)
 {
-	DBG("service %p", service);
+	DBG("service %p (%s)",
+		service, connman_service_get_identifier(service));
 
 	if (!resolv)
 		return;
Signature · 1 line
2.42.0
#3 lore raw
In reply to Grant Erickson

Hi Grant,

Quoted 6 lines

This adds the service identifier to the 'DBG' statements in timeserver.c:'ts_reset' and session.c:'service_state_changed' to aid debugging in a multi-technology environment with "EnableOnlineToReadyTransition" asserted and for consistency with other DBG statements in other modules.

Quoted 7 lines

Grant Erickson (2):
session: Add service identifier to 'DBG' in 'service_state_changed'.
timeserver: Add service identifier to 'DBG' in 'ts_reset'.

src/session.c | 4 +++-
src/timeserver.c | 3 ++-

2 files changed, 5 insertions(+), 2 deletions(-)

both patches have been applied.

Regards

Marcel