diff mbox series

[14/15] wispr: Leverage 'wispr_log_proxy_failure'.

Message ID 20241212052817.2021264-15-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 'wispr_log_proxy_failure' from 'proxy_callback' with the "No
valid proxy" reason and from 'wispr_portal_detect' with the "Failed to
lookup" reason on Wireless Internet Service Provider roaming (WISPr)
online reachability check proxy failures.
---
 src/wispr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/wispr.c b/src/wispr.c
index 60a3a011da58..10990c725986 100644
--- a/src/wispr.c
+++ b/src/wispr.c
@@ -1147,7 +1147,7 @@  static void proxy_callback(const char *proxy, void *user_data)
 		return;
 
 	if (!proxy) {
-		DBG("no valid proxy");
+		wispr_log_proxy_failure(wp_context, "No valid proxy");
 
 		wp_context->cb(wp_context->service,
 				wp_context->type,
@@ -1320,6 +1320,8 @@  static int wispr_portal_detect(struct connman_wispr_portal_context *wp_context,
 						proxy_callback, wp_context);
 
 		if (wp_context->proxy_token == 0) {
+			wispr_log_proxy_failure(wp_context, "Failed to lookup");
+
 			err = -EINVAL;
 			wispr_portal_context_unref(wp_context);
 		}