diff --git a/bacnet-stack/ports/at91sam7s/dlmstp.c b/bacnet-stack/ports/at91sam7s/dlmstp.c index 2b3d5a70..0cd79461 100644 --- a/bacnet-stack/ports/at91sam7s/dlmstp.c +++ b/bacnet-stack/ports/at91sam7s/dlmstp.c @@ -1122,6 +1122,8 @@ static bool MSTP_Master_Node_FSM( Master_State = MSTP_MASTER_STATE_IDLE; /* clear our flag we were holding for comparison */ MSTP_Flag.ReceivedValidFrame = false; + /* clear the queue */ + (void) Ringbuf_Pop(&PDU_Queue, NULL); } else if ((Timer_Silence() > Treply_delay) || (pkt != NULL)) { /* DeferredReply */ /* If no reply will be available from the higher layers */ diff --git a/bacnet-stack/ports/stm32f10x/dlmstp.c b/bacnet-stack/ports/stm32f10x/dlmstp.c index a8811273..8b212ec4 100644 --- a/bacnet-stack/ports/stm32f10x/dlmstp.c +++ b/bacnet-stack/ports/stm32f10x/dlmstp.c @@ -1236,6 +1236,8 @@ static bool MSTP_Master_Node_FSM( Master_State = MSTP_MASTER_STATE_IDLE; /* clear our flag we were holding for comparison */ MSTP_Flag.ReceivedValidFrame = false; + /* clear the queue */ + (void) Ringbuf_Pop(&PDU_Queue, NULL); } else if (rs485_silence_elapsed(Treply_delay) || (pkt != NULL)) { /* DeferredReply */ /* If no reply will be available from the higher layers */