From a0bf8d5740f5ec8d9f9ff93ef7f0e5972c056a35 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Sat, 3 Sep 2011 21:57:26 +0200 Subject: [PATCH] fixed bug #33952 PUSH flag in incoming packet is lost when packet is aggregated and sent to application --- CHANGELOG | 4 ++++ src/core/tcp_in.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0082a786..8af059e9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -44,6 +44,10 @@ HISTORY ++ Bugfixes: + 2011-09-03: Simon Goldschmidt + * tcp_in.c: fixed bug #33952 PUSH flag in incoming packet is lost when packet + is aggregated and sent to application + 2011-09-01: Simon Goldschmidt * opt.h: fixed bug #31809 LWIP_EVENT_API in opts.h is inconsistent compared to other options diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index 9d40ec53..0cfb437b 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -300,6 +300,10 @@ tcp_input(struct pbuf *p, struct netif *inp) recv_data = NULL; recv_flags = 0; + if (flags & TCP_PSH) { + p->flags |= PBUF_FLAG_PUSH; + } + /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { /* Notify again application with data previously received. */ @@ -354,9 +358,6 @@ tcp_input(struct pbuf *p, struct netif *inp) tcp_abort(pcb); goto aborted; } - if (flags & TCP_PSH) { - recv_data->flags |= PBUF_FLAG_PUSH; - } /* Notify application that data has been received. */ TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err);