diff --git a/src/api/api_lib.c b/src/api/api_lib.c index dc0cd8d6..620e5113 100644 --- a/src/api/api_lib.c +++ b/src/api/api_lib.c @@ -572,7 +572,7 @@ netconn_recv_data(struct netconn *conn, void **new_buf, u8_t apiflags) #if LWIP_TCP static err_t -netconn_tcp_recvd_msg(struct netconn *conn, u32_t len, struct api_msg* msg) +netconn_tcp_recvd_msg(struct netconn *conn, size_t len, struct api_msg* msg) { LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); @@ -584,7 +584,7 @@ netconn_tcp_recvd_msg(struct netconn *conn, u32_t len, struct api_msg* msg) } err_t -netconn_tcp_recvd(struct netconn *conn, u32_t len) +netconn_tcp_recvd(struct netconn *conn, size_t len) { err_t err; API_MSG_VAR_DECLARE(msg); @@ -918,8 +918,8 @@ netconn_write_vectors_partly(struct netconn *conn, struct netvector *vectors, u1 return ERR_OK; } else if (size > INT_MAX) { /* this is required by the socket layer (cannot send full size_t range) */ - return ERR_VAL; - } + return ERR_VAL; + } API_MSG_VAR_ALLOC(msg); /* non-blocking write sends as much */ diff --git a/src/api/api_msg.c b/src/api/api_msg.c index eff424a1..d79c37d4 100644 --- a/src/api/api_msg.c +++ b/src/api/api_msg.c @@ -1495,7 +1495,7 @@ lwip_netconn_do_recv(void *m) msg->err = ERR_OK; if (msg->conn->pcb.tcp != NULL) { if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { - u32_t remaining = msg->msg.r.len; + size_t remaining = msg->msg.r.len; do { u16_t recved = (remaining > 0xffff) ? 0xffff : (u16_t)remaining; tcp_recved(msg->conn->pcb.tcp, recved); diff --git a/src/include/lwip/api.h b/src/include/lwip/api.h index 901d025d..4c6bea1b 100644 --- a/src/include/lwip/api.h +++ b/src/include/lwip/api.h @@ -319,7 +319,7 @@ err_t netconn_recv_udp_raw_netbuf(struct netconn *conn, struct netbuf **new_bu err_t netconn_recv_udp_raw_netbuf_flags(struct netconn *conn, struct netbuf **new_buf, u8_t apiflags); err_t netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf); err_t netconn_recv_tcp_pbuf_flags(struct netconn *conn, struct pbuf **new_buf, u8_t apiflags); -err_t netconn_tcp_recvd(struct netconn *conn, u32_t len); +err_t netconn_tcp_recvd(struct netconn *conn, size_t len); err_t netconn_sendto(struct netconn *conn, struct netbuf *buf, const ip_addr_t *addr, u16_t port); err_t netconn_send(struct netconn *conn, struct netbuf *buf); diff --git a/src/include/lwip/priv/api_msg.h b/src/include/lwip/priv/api_msg.h index 9005e24b..c64bbb65 100644 --- a/src/include/lwip/priv/api_msg.h +++ b/src/include/lwip/priv/api_msg.h @@ -120,7 +120,7 @@ struct api_msg { } w; /** used for lwip_netconn_do_recv */ struct { - u32_t len; + size_t len; } r; #if LWIP_TCP /** used for lwip_netconn_do_close (/shutdown) */