mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
apps/smtp: Fix missing altcp conversion in smtp_send_bodyh_data
The pcb is "struct altcp_pcb *" so we cannot call tcp_sndbuf/tcp_write here. Use altcp_sndbuf/altcp_write instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
This commit is contained in:
parent
b9d5399ec1
commit
f5f34f138c
@ -1419,8 +1419,8 @@ smtp_send_bodyh_data(struct altcp_pcb *pcb, char **from, u16_t *howmany)
|
|||||||
err_t err;
|
err_t err;
|
||||||
u16_t len = *howmany;
|
u16_t len = *howmany;
|
||||||
|
|
||||||
len = (u16_t)LWIP_MIN(len, tcp_sndbuf(pcb));
|
len = (u16_t)LWIP_MIN(len, altcp_sndbuf(pcb));
|
||||||
err = tcp_write(pcb, *from, len, TCP_WRITE_FLAG_COPY);
|
err = altcp_write(pcb, *from, len, TCP_WRITE_FLAG_COPY);
|
||||||
if (err == ERR_OK) {
|
if (err == ERR_OK) {
|
||||||
*from += len;
|
*from += len;
|
||||||
if ((*howmany -= len) > 0) {
|
if ((*howmany -= len) > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user