mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 00:14:02 +00:00
altcp_tls_mbedtls: tcp_out: Fix handshake when called from u-boot
When using the http-client LWIP app in U-Boot (OS_SYS=0), the handshake fails because LWIP doesn't send TCP packets after it initiates. Signed-off-by: Javier Tia <javier.tia@linaro.org>
This commit is contained in:
parent
0ccd09df52
commit
2e7fb9700a
@ -1292,6 +1292,8 @@ altcp_mbedtls_bio_send(void *ctx, const unsigned char *dataptr, size_t size)
|
||||
while (size_left) {
|
||||
u16_t write_len = (u16_t)LWIP_MIN(size_left, 0xFFFF);
|
||||
err_t err = altcp_write(conn->inner_conn, (const void *)dataptr, write_len, apiflags);
|
||||
/* try to send data... */
|
||||
altcp_output(conn->inner_conn);
|
||||
if (err == ERR_OK) {
|
||||
written += write_len;
|
||||
size_left -= write_len;
|
||||
|
@ -1255,14 +1255,6 @@ tcp_output(struct tcp_pcb *pcb)
|
||||
LWIP_ASSERT("don't call tcp_output for listen-pcbs",
|
||||
pcb->state != LISTEN);
|
||||
|
||||
/* First, check if we are invoked by the TCP input processing
|
||||
code. If so, we do not output anything. Instead, we rely on the
|
||||
input processing code to call us when input processing is done
|
||||
with. */
|
||||
if (tcp_input_pcb == pcb) {
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd);
|
||||
|
||||
seg = pcb->unsent;
|
||||
@ -2039,7 +2031,7 @@ tcp_rst(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno,
|
||||
u16_t local_port, u16_t remote_port)
|
||||
{
|
||||
struct pbuf *p;
|
||||
|
||||
|
||||
p = tcp_rst_common(pcb, seqno, ackno, local_ip, remote_ip, local_port, remote_port);
|
||||
if (p != NULL) {
|
||||
tcp_output_control_segment(pcb, p, local_ip, remote_ip);
|
||||
|
Loading…
Reference in New Issue
Block a user