gsm/lapdm: Prevent LAPD tx_queue from filling up in polling mode
If LAPDm receives an I-Frame while there already is an I-Frame in the
tx_queue the code generates an additional RR (to acknowledge the
received I-Frame). Instead, N(R) of the I-Frame in the tx_queue should
be updated to ACK the data.
diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c
index ef1d22a..8c5fe9c 100644
--- a/src/gsm/lapd_core.c
+++ b/src/gsm/lapd_core.c
@@ -1607,6 +1607,12 @@
if (!dl->own_busy) {
/* NOTE: V(R) is already set above */
rc = lapd_send_i(lctx, __LINE__);
+
+ /* if update_pending_iframe returns 0 it updated
+ * the lapd header of an iframe in the tx queue */
+ if (rc && dl->update_pending_frames)
+ rc = dl->update_pending_frames(lctx);
+
if (rc) {
LOGP(DLLAPD, LOGL_INFO, "we are not busy and "
"have no pending data, send RR\n");