From cabe9733547fd4eb5de7c31cb079281c89b0532e Mon Sep 17 00:00:00 2001 From: skarg Date: Wed, 2 Dec 2009 17:59:36 +0000 Subject: [PATCH] Removed forever loop on MS/TP receive for fast processors since the incoming character wait is significantly slower than the processor speed. Thank you Paul! --- bacnet-stack/ports/bdk-atxx4-mstp/dlmstp.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/bacnet-stack/ports/bdk-atxx4-mstp/dlmstp.c b/bacnet-stack/ports/bdk-atxx4-mstp/dlmstp.c index 751b2a08..45a6b0e2 100644 --- a/bacnet-stack/ports/bdk-atxx4-mstp/dlmstp.c +++ b/bacnet-stack/ports/bdk-atxx4-mstp/dlmstp.c @@ -1221,15 +1221,7 @@ uint16_t dlmstp_receive( /* only do receive state machine while we don't have a frame */ if ((MSTP_Flag.ReceivedValidFrame == false) && (MSTP_Flag.ReceivedInvalidFrame == false)) { - for (;;) { - MSTP_Receive_Frame_FSM(); - if (MSTP_Flag.ReceivedValidFrame || MSTP_Flag.ReceivedInvalidFrame) - break; - /* if we are not idle, then we are - receiving a frame or timing out */ - if (Receive_State == MSTP_RECEIVE_STATE_IDLE) - break; - } + MSTP_Receive_Frame_FSM(); } /* only do master state machine while rx is idle */ if (Receive_State == MSTP_RECEIVE_STATE_IDLE) {