From f5f34f138cab279a0c7d0808641879414dfc917c Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Wed, 10 May 2017 14:08:20 +0800 Subject: [PATCH] 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 Signed-off-by: Dirk Ziegelmeier --- src/apps/smtp/smtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/smtp/smtp.c b/src/apps/smtp/smtp.c index eec7a46b..ff04c786 100644 --- a/src/apps/smtp/smtp.c +++ b/src/apps/smtp/smtp.c @@ -1419,8 +1419,8 @@ smtp_send_bodyh_data(struct altcp_pcb *pcb, char **from, u16_t *howmany) err_t err; u16_t len = *howmany; - len = (u16_t)LWIP_MIN(len, tcp_sndbuf(pcb)); - err = tcp_write(pcb, *from, len, TCP_WRITE_FLAG_COPY); + len = (u16_t)LWIP_MIN(len, altcp_sndbuf(pcb)); + err = altcp_write(pcb, *from, len, TCP_WRITE_FLAG_COPY); if (err == ERR_OK) { *from += len; if ((*howmany -= len) > 0) {