From 38d944d6c97c134a7eec0b0ff8a6255f1a49932d Mon Sep 17 00:00:00 2001 From: skarg Date: Wed, 2 Dec 2009 17:54:24 +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. --- bacnet-stack/ports/at91sam7s/dlmstp.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/bacnet-stack/ports/at91sam7s/dlmstp.c b/bacnet-stack/ports/at91sam7s/dlmstp.c index 26fa122b..f188f090 100644 --- a/bacnet-stack/ports/at91sam7s/dlmstp.c +++ b/bacnet-stack/ports/at91sam7s/dlmstp.c @@ -1202,15 +1202,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) {