Compare commits

..

3 Commits

Author SHA1 Message Date
Abdel-dev-tech
910cea10a0
Merge 2c0a25ecd6 into d0efd9ef7b 2024-02-20 01:06:23 -07:00
Simon Goldschmidt
d0efd9ef7b tcpip: fix that TCPIP_CORE_LOCK is not released for LWIP_TIMERS==0
See bug #65328

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2024-02-19 21:44:18 +01:00
Krzysztof Mazur
e799c266fa makefsdata: extend file type matching with .shtml and .shtm
[Problem]
When using makefsdata perl script to convert shtml files with SSI tags
the shtml files get generated with text/plain content type, making
browsers not render them correctly

[Solution]
Extend the regex to generate text/html content type for any of:
.htm, .html, .shtm, .shtml extensions
2024-02-19 20:58:58 +01:00
2 changed files with 16 additions and 7 deletions

View File

@ -68,11 +68,20 @@ sys_mutex_t lock_tcpip_core;
static void tcpip_thread_handle_msg(struct tcpip_msg *msg); static void tcpip_thread_handle_msg(struct tcpip_msg *msg);
#if !LWIP_TIMERS #if !LWIP_TIMERS
/* wait for a message with timers disabled (e.g. pass a timer-check trigger into tcpip_thread) */
#define TCPIP_MBOX_FETCH(mbox, msg) sys_mbox_fetch(mbox, msg) /** Wait for a message with timers disabled (e.g. pass a timer-check trigger into tcpip_thread) */
static void
tcpip_mbox_fetch(sys_mbox_t* mbox, void** msg)
{
LWIP_ASSERT_CORE_LOCKED();
UNLOCK_TCPIP_CORE();
sys_mbox_fetch(mbox, msg);
LOCK_TCPIP_CORE();
}
#else /* !LWIP_TIMERS */ #else /* !LWIP_TIMERS */
/* wait for a message, timeouts are processed while waiting */
#define TCPIP_MBOX_FETCH(mbox, msg) tcpip_timeouts_mbox_fetch(mbox, msg)
/** /**
* Wait (forever) for a message to arrive in an mbox. * Wait (forever) for a message to arrive in an mbox.
* While waiting, timeouts are processed. * While waiting, timeouts are processed.
@ -81,7 +90,7 @@ static void tcpip_thread_handle_msg(struct tcpip_msg *msg);
* @param msg the place to store the message * @param msg the place to store the message
*/ */
static void static void
tcpip_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg) tcpip_mbox_fetch(sys_mbox_t *mbox, void **msg)
{ {
u32_t sleeptime, res; u32_t sleeptime, res;
@ -139,7 +148,7 @@ tcpip_thread(void *arg)
while (1) { /* MAIN Loop */ while (1) { /* MAIN Loop */
LWIP_TCPIP_THREAD_ALIVE(); LWIP_TCPIP_THREAD_ALIVE();
/* wait for a message, timeouts are processed while waiting */ /* wait for a message, timeouts are processed while waiting */
TCPIP_MBOX_FETCH(&tcpip_mbox, (void **)&msg); tcpip_mbox_fetch(&tcpip_mbox, (void **)&msg);
if (msg == NULL) { if (msg == NULL) {
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n")); LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n"));
LWIP_ASSERT("tcpip_thread: invalid message", 0); LWIP_ASSERT("tcpip_thread: invalid message", 0);

View File

@ -21,7 +21,7 @@ while($file = <FILES>) {
print(HEADER "HTTP/1.0 200 OK\r\n"); print(HEADER "HTTP/1.0 200 OK\r\n");
} }
print(HEADER "Server: lwIP/pre-0.6 (http://www.sics.se/~adam/lwip/)\r\n"); print(HEADER "Server: lwIP/pre-0.6 (http://www.sics.se/~adam/lwip/)\r\n");
if($file =~ /\.html$/) { if($file =~ /\.s?html?$/) {
print(HEADER "Content-type: text/html\r\n"); print(HEADER "Content-type: text/html\r\n");
} elsif($file =~ /\.gif$/) { } elsif($file =~ /\.gif$/) {
print(HEADER "Content-type: image/gif\r\n"); print(HEADER "Content-type: image/gif\r\n");