mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-03 21:32:08 +00:00
api_msg: Use lwip_netconn_is_err_msg instead of NULL test in netconn_drain()
The NULL test no longer work after commite0a2472706
, it needs to test with lwip_netconn_is_err_msg() instead. Fixes:e0a2472706
("netconn/sockets: remove fatal error handling, fix asynchronous error handling, ensure data before RST can be received") Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
f28c1c851b
commit
0b2a652317
@ -816,7 +816,8 @@ netconn_drain(struct netconn *conn)
|
||||
while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) {
|
||||
#if LWIP_TCP
|
||||
if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) {
|
||||
if (mem != NULL) {
|
||||
err_t err;
|
||||
if (lwip_netconn_is_err_msg(mem, &err) == 0) {
|
||||
p = (struct pbuf*)mem;
|
||||
/* pcb might be set to NULL already by err_tcp() */
|
||||
if (conn->pcb.tcp != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user