Skip to contentSkip to conversation

lwip: wget: Fix incorrect rebase of 5907c81 on top of 5907c81

PATCH In review Adriano Cordova 4 participants 6 messages Nov 28, 2024 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lwip: wget: Fix incorrect rebase of 5907c81 on top of 5907c81

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")
---
 net/lwip/wget.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
net/lwip/wget.c +1 -3
index af48d741a4..8b3e5cf29b 100644
@@ -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);
Signature · 1 line
2.43.0
#1 lore raw

Hi Adriano,

You may want to check that your commit title is appropriate here as it seems odd to me to say "rebase of commit A on top of commit A".

I don't have anything else to say on that patch otherwise :)

Cheers,
Quentin

Quoted 41 lines · Adriano Cordova

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")
---
  net/lwip/wget.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)
net/lwip/wget.c +1 -3
index af48d741a4..8b3e5cf29b 100644
@@ -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);
Acked-by on v1 1/1
#2 lore raw
In reply to Adriano Cordova

Hi Adriano,

Quoted 7 lines · Adriano Cordova

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")

Does it fix anything in -next? Fixes tags are used on actual fixes

Other than that

Quoted 38 lines
---
 net/lwip/wget.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
net/lwip/wget.c +1 -4
index af48d741a4..8b3e5cf29b 100644
@@ -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);
--

2.43.0

#3 lore raw
Quoted 10 lines · Ilias Apalodimas

Hi Adriano,

Quoted 6 lines · Adriano Cordova

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.

Quoted 5 lines
Quoted 1 line
Fixes Commit 5907c81 ("net: lwip: Enable https:// support for wget")

Does it fix anything in -next? Fixes tags are used on actual fixes

Other than that

Well... obviously with the change Quentin pointed out...

Quoted 40 lines
Quoted 38 lines
---
 net/lwip/wget.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
net/lwip/wget.c +1 -4
index af48d741a4..8b3e5cf29b 100644
@@ -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);
--

2.43.0

#4 lore raw
In reply to Ilias Apalodimas
Quoted 4 lines · Ilias Apalodimas

Hi Adriano,

Quoted 1 line · Adriano Cordova
Quoted 9 lines
Quoted 6 lines

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")

Does it fix anything in -next? Fixes tags are used on actual fixes

Yes, the lwip wget command does not work in next

Quoted 46 lines

Other than that

net/lwip/wget.c static err_t httpc_headers_done_cb(httpc_state_t

Quoted 11 lines
---
 net/lwip/wget.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
net/lwip/wget.c +0 -0
index af48d741a4..8b3e5cf29b 100644
@@ -288,7 +288,6 @@ static err_t httpc_headers_done_cb(httpc_state_t

*connection, void *arg, struct

net/lwip/wget.c static int wget_loop(struct udevice *udev, ulong

Quoted 8 lines
net/lwip/wget.c +0 -1
 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)

net/lwip/wget.c static int wget_loop(struct udevice *udev, ulong

Quoted 8 lines
net/lwip/wget.c +0 -1
        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)

Quoted 11 lines
net/lwip/wget.c +1 -2
        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);
--

2.43.0

Reviewed-by on v1 1/1
#5 lore raw
In reply to Adriano Cordova
Quoted 11 lines · Adriano Cordova

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")
---
 net/lwip/wget.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

With Quentin's comment on the commit subject addressed:

Thanks,

Signature · 1 line
Jerome