diff mbox series

[08/15] service: Leverage 'service_set_proxy_method'.

Message ID 20241212052817.2021264-9-gerickson@nuovations.com (mailing list archive)
State New
Headers show
Series Improve PAC URL Mutation and PAC URL and WISPr Proxy Failure Logging | expand

Commit Message

Grant Erickson Dec. 12, 2024, 5:28 a.m. UTC
Leverage 'service_set_proxy_method' for
'connman_service_set_proxy_method', the first of two call sites.
---
 src/service.c | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/src/service.c b/src/service.c
index e58958635992..5c94c2962de8 100644
--- a/src/service.c
+++ b/src/service.c
@@ -5617,19 +5617,14 @@  static void service_set_proxy_method(struct connman_service *service,
 void connman_service_set_proxy_method(struct connman_service *service,
 					enum connman_service_proxy_method method)
 {
-	DBG("service %p (%s) method %d (%s)",
-		service, connman_service_get_identifier(service),
-		method, proxymethod2string(method));
-
-	if (!service || service->hidden)
-		return;
-
-	service->proxy = method;
+	const bool donotifier = method != CONNMAN_SERVICE_PROXY_METHOD_AUTO;
+	void * const context = NULL;
 
-	proxy_changed(service);
-
-	if (method != CONNMAN_SERVICE_PROXY_METHOD_AUTO)
-		__connman_notifier_proxy_changed(service);
+	service_set_proxy_method(service,
+		method,
+		donotifier,
+		NULL,
+		context);
 }
 
 enum connman_service_proxy_method connman_service_get_proxy_method(