From ba3a39957de97d0270581596ba838aa048df3687 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 30 Oct 2018 21:21:08 +0800 Subject: [PATCH] Fix mqtt unit test broken ebb0dc14a733 Fixes: ebb0dc14a733 ("tcp_recved: check for overflow and warn about too big values") Signed-off-by: Axel Lin Acked-by: Simon Goldschmidt --- test/unit/mqtt/test_mqtt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/unit/mqtt/test_mqtt.c b/test/unit/mqtt/test_mqtt.c index 32f08e67..7cff13ea 100644 --- a/test/unit/mqtt/test_mqtt.c +++ b/test/unit/mqtt/test_mqtt.c @@ -94,6 +94,8 @@ START_TEST(basic_connect) p = pbuf_alloc(PBUF_RAW, sizeof(rxbuf), PBUF_REF); fail_unless(p != NULL); p->payload = rxbuf; + /* since we hack the rx path, we have to hack the rx window, too: */ + client->conn->rcv_wnd -= p->tot_len; if (client->conn->recv(client->conn->callback_arg, client->conn, p, ERR_OK) != ERR_OK) { pbuf_free(p); }