U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Forissier <jerome.forissier@linaro.org>
To: Adriano Cordova <adrianox@gmail.com>, u-boot@lists.denx.de
Cc: joe.hershberger@ni.com, rfried.dev@gmail.com, xypron.glpk@gmx.de,
	ilias.apalodimas@linaro.org, trini@konsulko.com
Subject: Re: [PATCH v3] lwip: wget: pass port and server_name via wget_ctx
Date: Tue, 3 Dec 2024 14:58:09 +0100	[thread overview]
Message-ID: <597fb901-fb91-43cc-a871-cedd0a238583@linaro.org> (raw)
In-Reply-To: <20241203125534.1582903-1-adrianox@gmail.com>



On 12/3/24 13:55, Adriano Cordova wrote:
>   Commit 5907c81 ("net: lwip: Enable https:// support for wget") was not
>   correctly rebased on top of the changes introduced by Commit 6cc4d04
>   ("net/lwip: wget: put server_name and port into wget_ctx") in next.
>   This commit re-applies a  couple of lines from 6cc4d04.
> 
>   Fixes: Commit 5907c81 ("net: lwip: Enable https:// support for wget")
> 
> Signed-off-by: Adriano Cordova <adrianox@gmail.com>
> ---
> Changes in v3: there was still another server_name to be replaced by ctx.server_name
> Changes in v2: changed commit name
>  net/lwip/wget.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

Thanks,
-- 
Jerome
 
> diff --git a/net/lwip/wget.c b/net/lwip/wget.c
> index af48d741a4..3d02f26c09 100644
> --- a/net/lwip/wget.c
> +++ b/net/lwip/wget.c
> @@ -288,7 +288,6 @@ static err_t httpc_headers_done_cb(httpc_state_t *connection, void *arg, struct
>  
>  static int wget_loop(struct udevice *udev, ulong dst_addr, char *uri)
>  {
> -	char server_name[SERVER_NAME_SIZE];
>  #if defined CONFIG_WGET_HTTPS
>  	altcp_allocator_t tls_allocator;
>  #endif
> @@ -297,7 +296,6 @@ static int wget_loop(struct udevice *udev, ulong dst_addr, char *uri)
>  	struct netif *netif;
>  	struct wget_ctx ctx;
>  	char *path;
> -	u16 port;
>  	bool is_https;
>  
>  	ctx.daddr = dst_addr;
> @@ -307,7 +305,7 @@ static int wget_loop(struct udevice *udev, ulong dst_addr, char *uri)
>  	ctx.prevsize = 0;
>  	ctx.start_time = 0;
>  
> -	if (parse_url(uri, server_name, &port, &path, &is_https))
> +	if (parse_url(uri, ctx.server_name, &ctx.port, &path, &is_https))
>  		return CMD_RET_USAGE;
>  
>  	netif = net_lwip_new_netif(udev);
> @@ -319,7 +317,7 @@ static int wget_loop(struct udevice *udev, ulong dst_addr, char *uri)
>  	if (is_https) {
>  		tls_allocator.alloc = &altcp_tls_alloc;
>  		tls_allocator.arg =
> -			altcp_tls_create_config_client(NULL, 0, server_name);
> +			altcp_tls_create_config_client(NULL, 0, ctx.server_name);
>  
>  		if (!tls_allocator.arg) {
>  			log_err("error: Cannot create a TLS connection\n");

      reply	other threads:[~2024-12-03 13:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03 12:55 [PATCH v3] lwip: wget: pass port and server_name via wget_ctx Adriano Cordova
2024-12-03 13:58 ` Jerome Forissier [this message]

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=597fb901-fb91-43cc-a871-cedd0a238583@linaro.org \
    --to=jerome.forissier@linaro.org \
    --cc=adrianox@gmail.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=joe.hershberger@ni.com \
    --cc=rfried.dev@gmail.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox