The real problem is that we have to do patching in first place. Ideally it should be used as-is without touching the source tree at all.
Giovanni
[INFO] lwIP version 2.0 Topic is solved
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: [INFO] lwIP version 2.0
Exactly! That is why I propose to revert current patch of fs.c in bunded lwip and introduce lwiphttpdopts.h with nessery redefinitions of default defines in projects which use httpd application.
If you agree with my proposal then I could prepare the patch for it.
If you agree with my proposal then I could prepare the patch for it.
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: [INFO] lwIP version 2.0
If I remember well there were issues, you will not be able to remove all patches.
Giovanni
Giovanni
Re: [INFO] lwIP version 2.0
I just revert you patch of fs.c in bundled lwip:
And redefine necessary default defines of httpd in my project's lwipopts.h. Everything work as expected.
Also, I checked three demo projects that have the copy of httpd_opts.h (RT-STM32-LWIP-FATFS-USB, RT-STM32F107-OLIMEX_P107-LWIP, RT-STM32F107-OLIMEX_P107-LWIP) and no one redefine any default defines in it (only RT-STM32-LWIP-FATFS-USB-HTTPS have different line ending for some reason).
So if you revert patch of fs.c in bundled lwip and remove unnessery httpd_opts.h configs in demo projects then everthins still works as previously.
Code: Select all
diff --git a/ext/lwip/src/apps/httpd/fs.c b/ext/lwip/src/apps/httpd/fs.c
index 335bddd..84ab03c 100644
--- a/ext/lwip/src/apps/httpd/fs.c
+++ b/ext/lwip/src/apps/httpd/fs.c
@@ -30,9 +30,7 @@
*
*/
-/* CHIBIOS FIX */
-//#include "lwip/apps/httpd_opts.h"
-#include "httpd_opts.h"
+#include "lwip/apps/httpd_opts.h"
#include "lwip/def.h"
#include "lwip/apps/fs.h"
#include "fsdata.h"
And redefine necessary default defines of httpd in my project's lwipopts.h. Everything work as expected.
Also, I checked three demo projects that have the copy of httpd_opts.h (RT-STM32-LWIP-FATFS-USB, RT-STM32F107-OLIMEX_P107-LWIP, RT-STM32F107-OLIMEX_P107-LWIP) and no one redefine any default defines in it (only RT-STM32-LWIP-FATFS-USB-HTTPS have different line ending for some reason).
So if you revert patch of fs.c in bundled lwip and remove unnessery httpd_opts.h configs in demo projects then everthins still works as previously.
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: [INFO] lwIP version 2.0
I don't like much having to manually redefine things in lwipopts.h.
Giovanni
Giovanni
Re: [INFO] lwIP version 2.0
As I already mention current demo projects do not redefine anything form httpd_opts.h. And it is possible to use the separate header with all httpd option by with custom name, for example, lwiphttpd_opts.h or lwiphttpdopts.h. And just inclue this header from lwipopts.h.
In any case, the current state of demo projects and bundled/patched lwip is mistaken. Because if you redefine anything in demo project's httpd_opts.h then it will not apply to httpd apps (the reason I describe early).
To fix it we have two options:
- apply the same patch as for fs.c to fsdata.h and httpd.h
- revert patch in fs.c and use project's httpd options header by include it from lwipopts.h
For me, last option is preferred.
In any case, the current state of demo projects and bundled/patched lwip is mistaken. Because if you redefine anything in demo project's httpd_opts.h then it will not apply to httpd apps (the reason I describe early).
To fix it we have two options:
- apply the same patch as for fs.c to fsdata.h and httpd.h
- revert patch in fs.c and use project's httpd options header by include it from lwipopts.h
For me, last option is preferred.
Re: [INFO] lwIP version 2.0
Giovanni, if you agree with last option then I could create a patch (of course it is rather trivial).
Also, I have one more proposal for httpd defines header name - lwipopts_httpd.h .
Also, I have one more proposal for httpd defines header name - lwipopts_httpd.h .
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: [INFO] lwIP version 2.0
The first version of path attached.
I am not sure about the correctness of license header, so please make necessary modification.
Also in RT-STM32-LWIP-FATFS-USB-HTTPS demo, it seems lwipopts.h was for previous lwip version, so I update it to the common form. (Currently, this demo does not compile because of conflicting types for 'time_t').
I want to mention that current HTTPD_SERVER_AGENT definition does not have actual effect because of LWIP_HTTPD_DYNAMIC_HEADERS disabled and demo fsdata burn server agent header value in files.
Update:
In bundled lwip version one ChibiOS patch must be reverted:
I am not sure about the correctness of license header, so please make necessary modification.
Also in RT-STM32-LWIP-FATFS-USB-HTTPS demo, it seems lwipopts.h was for previous lwip version, so I update it to the common form. (Currently, this demo does not compile because of conflicting types for 'time_t').
I want to mention that current HTTPD_SERVER_AGENT definition does not have actual effect because of LWIP_HTTPD_DYNAMIC_HEADERS disabled and demo fsdata burn server agent header value in files.
Update:
In bundled lwip version one ChibiOS patch must be reverted:
Code: Select all
diff --git a/ext/lwip/src/apps/httpd/fs.c b/ext/lwip/src/apps/httpd/fs.c
index 335bddd..84ab03c 100644
--- a/ext/lwip/src/apps/httpd/fs.c
+++ b/ext/lwip/src/apps/httpd/fs.c
@@ -30,9 +30,7 @@
*
*/
-/* CHIBIOS FIX */
-//#include "lwip/apps/httpd_opts.h"
-#include "httpd_opts.h"
+#include "lwip/apps/httpd_opts.h"
#include "lwip/def.h"
#include "lwip/apps/fs.h"
#include "fsdata.h"
- Attachments
-
- httpd_opts_patch.zip
- (23.05 KiB) Downloaded 192 times
Return to “Small Change Requests”
Who is online
Users browsing this forum: No registered users and 16 guests