diff mbox series

[1/3] service: Leverage 'connman_service_is_default'.

Message ID 20231116030912.636756-2-gerickson@nuovations.com (mailing list archive)
State Superseded
Headers show
Series service: Minor address_updated Changes | expand

Commit Message

Grant Erickson Nov. 16, 2023, 3:09 a.m. UTC
This leverages the recently-added 'connman_service_is_default' in
'address_updated' rather than duplicating the same logic from the former
in the latter.
---
 src/service.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/service.c b/src/service.c
index 81a1bebdc14b..90ed111fc035 100644
--- a/src/service.c
+++ b/src/service.c
@@ -164,6 +164,7 @@  static void complete_online_check(struct connman_service *service,
 					enum connman_ipconfig_type type,
 					bool success);
 static bool service_downgrade_online_state(struct connman_service *service);
+static bool connman_service_is_default(const struct connman_service *service);
 
 struct find_data {
 	const char *path;
@@ -2018,7 +2019,7 @@  static void address_updated(struct connman_service *service,
 			enum connman_ipconfig_type type)
 {
 	if (is_connected(service->state) &&
-			service == connman_service_get_default()) {
+			connman_service_is_default(service)) {
 		nameserver_remove_all(service, type);
 		nameserver_add_all(service, type);
 		start_online_check(service, type);