Gcc complains that an array index is a 'char' when passing a 'char' to
toupper(). Quieten this by coercing to an 'unsigned char'.
Signed-off-by: goldsimon <goldsimon@gmx.de>
The comment in dhcp_handle_ack for 'offered_si_addr' states:
'boot file name copied in dhcp_parse_reply if not overloaded'
However this code was never reached if the packed was not 'overloaded'
Signed-off-by: goldsimon <goldsimon@gmx.de>
Threads blocked on the rx mbox are counted and on close,
one "netconn closed" message per thread is posted to the mbox
to ensure all threads are woken.
The netconn can then be safely deleted. In socket API, "fd_used"
and "fd_free_pending" help with auto-deleting the netconn.
Signed-off-by: goldsimon <goldsimon@gmx.de>
This is necessary to implement fullduplex sockets that are closed asynchronously:
the netconn in the socket must not be freed before all threads have given up
using it.
We now call the first part of 'netconn_delete()' (moved to 'netconn_prepare_delete()')
from lwip_close() and only actually end up calling 'netconn_free()' from
'free_socket()', which might be called later if LWIP_NETCONN_FULLDUPLEX is enabled.
Signed-off-by: goldsimon <goldsimon@gmx.de>
Calling SYS_ARCH_PROTECT() could happen twice in 'free_socket()' if
that free was executed delayed (e.g. in 'done_socket_locked()').
Signed-off-by: goldsimon <goldsimon@gmx.de>
The code to migrate flags from original segment updating wrong variable
so both remainder and remainder_flags may be incorrect. Fix it.
Fixes: f582c88339 ("tcp: persist timer re-work (bug #50837)")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Joel Cunningham <joel.cunningham@me.com>
Fixes: bug #53382: HTTPD_ADDITIONAL_CONTENT_TYPES doesn't compile
Reported-by: Giuseppe Modugno <giuseppe.modugno.loqed@gmail.com>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
As the common code to call tcp/udp/raw_netif_ip_addr_changed is called
by multiple places, add netif_do_ip_addr_changed() to call them.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Simon Goldschmidt <goldsimon@gmx.de>
Current implementation iterates the lowpan6_data.reass_list every time
dequeue_datagram() is called.
We can get previous lrh in all the context calling dequeue_datagram().
By adding a prev arguemnt to dequeue_datagram(), we can speed up the
dequeue datagram process.
All the callers never check return value of dequeue_datagram() as it
always return ERR_OR, thus make it return void instead.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Simon Goldschmidt <goldsimon@gmx.de>
Without this, closing the connection after successful transfer resulted
in a RST being sent because the window was not fully marked as 'recved'.
Signed-off-by: goldsimon <goldsimon@gmx.de>