From 557a5583e83e6bad0fcc80ee93945aeb42f4e858 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Tue, 20 Dec 2022 19:38:20 -0300 Subject: [PATCH] Unbreak --- mip/mip.c | 1 + mongoose.c | 1 + 2 files changed, 2 insertions(+) diff --git a/mip/mip.c b/mip/mip.c index 6219229c..77a63c9b 100644 --- a/mip/mip.c +++ b/mip/mip.c @@ -866,6 +866,7 @@ void mip_init(struct mg_mgr *mgr, struct mip_if *ifp) { size_t maxpktsize = 1540; ifp->rx.ptr = (char *) calloc(1, maxpktsize), ifp->rx.len = maxpktsize; ifp->tx.ptr = (char *) calloc(1, maxpktsize), ifp->tx.len = maxpktsize; + if (ifp->driver->rx == NULL && ifp->queue.len == 0) ifp->queue.len = 8192; if (ifp->queue.len) ifp->queue.buf = (uint8_t *) calloc(1, ifp->queue.len); ifp->timer_1000ms = mg_millis(); arp_cache_init(ifp->arp_cache, MIP_ARP_ENTRIES, 12); diff --git a/mongoose.c b/mongoose.c index 533612f4..7e1fbad4 100644 --- a/mongoose.c +++ b/mongoose.c @@ -7334,6 +7334,7 @@ void mip_init(struct mg_mgr *mgr, struct mip_if *ifp) { size_t maxpktsize = 1540; ifp->rx.ptr = (char *) calloc(1, maxpktsize), ifp->rx.len = maxpktsize; ifp->tx.ptr = (char *) calloc(1, maxpktsize), ifp->tx.len = maxpktsize; + if (ifp->driver->rx == NULL && ifp->queue.len == 0) ifp->queue.len = 8192; if (ifp->queue.len) ifp->queue.buf = (uint8_t *) calloc(1, ifp->queue.len); ifp->timer_1000ms = mg_millis(); arp_cache_init(ifp->arp_cache, MIP_ARP_ENTRIES, 12);