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:
Axel Lin 2017-05-10 14:08:20 +08:00 committed by Dirk Ziegelmeier
parent b9d5399ec1
commit f5f34f138c

View File

@ -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) {