All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: Grant Erickson <gerickson@nuovations.com>, connman@lists.linux.dev
Subject: Re: [PATCH 03/15] service: Leverage 'service_set_pac' function.
Date: Tue, 4 Mar 2025 11:06:44 -0600	[thread overview]
Message-ID: <f11d323b-a1f6-41c2-af92-bc08ee08ec49@gmail.com> (raw)
In-Reply-To: <20250221155653.760046-4-gerickson@nuovations.com>

Hi Grant,

On 2/21/25 9:56 AM, Grant Erickson wrote:
> Leverage 'service_set_pac' at the three call sites the proxy
> auto-configuration (PAC) URL is currently set or cleared for a network
> service.
> 
> Frequently, a spurious, misconfigured, or otherwise incorrect PAC URL
> is the source of connectivity problems, particularly for online
> reachability checks. Consequently, being able to log all such
> mutations can be helpful in triaging such problems.
> ---
>   src/service.c | 17 ++++-------------
>   1 file changed, 4 insertions(+), 13 deletions(-)
> 
> diff --git a/src/service.c b/src/service.c
> index c48959a7940f..da851d681bc7 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -770,8 +770,7 @@ static int service_load(struct connman_service *service)
>   	str = g_key_file_get_string(keyfile,
>   				service->identifier, "Proxy.URL", NULL);
>   	if (str) {
> -		g_free(service->pac);
> -		service->pac = str;
> +		service_set_pac(service, str, false);

Does this leak str?

Also, Kernel Coding Style prefers that braces are not used for single statement 
blocks.  Quoting:
"Do not unnecessarily use braces where a single statement will do.

if (condition)
         action();
"

See https://www.kernel.org/doc/html/latest/process/coding-style.html

>   	}
>   
>   	service->mdns_config = g_key_file_get_boolean(keyfile,

Regards,
-Denis

  reply	other threads:[~2025-03-04 17:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-21 15:56 [PATCH 00/15 RESEND] Improve PAC URL Mutation and PAC URL and WISPr Proxy Failure Logging Grant Erickson
2025-02-21 15:56 ` [PATCH 01/15] service: Add 'service_log_pac' function Grant Erickson
2025-02-21 15:56 ` [PATCH 02/15] service: Add 'service_set_pac' function Grant Erickson
2025-02-21 15:56 ` [PATCH 03/15] service: Leverage " Grant Erickson
2025-03-04 17:06   ` Denis Kenzior [this message]
2025-03-04 19:24     ` Grant Erickson
2025-03-04 19:51       ` Denis Kenzior
2025-02-21 15:56 ` [PATCH 04/15] service: Ensure the PAC URL is set in '__connman_service_set_proxy_autoconfig' Grant Erickson
2025-02-21 15:56 ` [PATCH 05/15] service: Document 'service_log_pac' Grant Erickson
2025-02-21 15:56 ` [PATCH 06/15] service: Document 'service_set_pac' Grant Erickson
2025-02-21 15:56 ` [PATCH 07/15] service: Add 'service_set_proxy_method' function Grant Erickson
2025-02-21 15:56 ` [PATCH 08/15] service: Leverage 'service_set_proxy_method' Grant Erickson
2025-03-04 17:09   ` Denis Kenzior
2025-03-04 19:16     ` Grant Erickson
2025-02-21 15:56 ` [PATCH 09/15] " Grant Erickson
2025-03-04 17:12   ` Denis Kenzior
2025-03-04 19:09     ` Grant Erickson
2025-02-21 15:56 ` [PATCH 10/15] service: Document 'service_set_proxy_method' Grant Erickson
2025-02-21 15:56 ` [PATCH 11/15] service: Document 'service_set_proxy_method_auto_handler' Grant Erickson
2025-02-21 15:56 ` [PATCH 12/15] service: Document '__connman_service_set_proxy_autoconfig' Grant Erickson
2025-02-21 15:56 ` [PATCH 13/15] wispr: Add 'wispr_log_proxy_failure' function Grant Erickson
2025-02-21 15:56 ` [PATCH 14/15] wispr: Leverage 'wispr_log_proxy_failure' Grant Erickson
2025-02-21 15:56 ` [PATCH 15/15] wispr: Document 'wispr_log_proxy_failure' Grant Erickson
2025-03-04 17:10 ` [PATCH 00/15 RESEND] Improve PAC URL Mutation and PAC URL and WISPr Proxy Failure Logging patchwork-bot+connman
2025-03-05 18:40 ` patchwork-bot+connman
  -- strict thread matches above, loose matches on Subject: below --
2024-12-12  5:28 [PATCH 00/15] " Grant Erickson
2024-12-12  5:28 ` [PATCH 03/15] service: Leverage 'service_set_pac' function Grant Erickson

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=f11d323b-a1f6-41c2-af92-bc08ee08ec49@gmail.com \
    --to=denkenz@gmail.com \
    --cc=connman@lists.linux.dev \
    --cc=gerickson@nuovations.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.