mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-31 06:31:10 +00:00
parent
7996fc45f3
commit
5a2ac73b69
@ -1305,6 +1305,12 @@ class Lwip::Tcp_socket_dir final :
|
|||||||
case Lwip_file_handle::DATA:
|
case Lwip_file_handle::DATA:
|
||||||
{
|
{
|
||||||
if (_recv_pbuf == nullptr) {
|
if (_recv_pbuf == nullptr) {
|
||||||
|
if (!_pcb || _pcb->state == CLOSE_WAIT) {
|
||||||
|
shutdown();
|
||||||
|
out_count = 0;
|
||||||
|
return Read_result::READ_OK;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* queue the read if the PCB is active and
|
* queue the read if the PCB is active and
|
||||||
* there is nothing to read, otherwise return
|
* there is nothing to read, otherwise return
|
||||||
@ -1645,10 +1651,13 @@ err_t tcp_delayed_recv_callback(void *arg, struct tcp_pcb *pcb, struct pbuf *buf
|
|||||||
Lwip::Tcp_socket_dir::Pcb_pending *pending =
|
Lwip::Tcp_socket_dir::Pcb_pending *pending =
|
||||||
static_cast<Lwip::Tcp_socket_dir::Pcb_pending *>(arg);
|
static_cast<Lwip::Tcp_socket_dir::Pcb_pending *>(arg);
|
||||||
|
|
||||||
if (pending->buf && buf) {
|
/* XXX buf == nullptr means ENOTCONN */
|
||||||
pbuf_cat(pending->buf, buf);
|
if (buf) {
|
||||||
} else {
|
if (pending->buf) {
|
||||||
pending->buf = buf;
|
pbuf_cat(pending->buf, buf);
|
||||||
|
} else {
|
||||||
|
pending->buf = buf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user