--- branches/linux-serial/SlipSerial.cpp 2007/02/06 09:09:32 61 +++ branches/linux-serial/SlipSerial.cpp 2007/02/06 14:01:26 62 @@ -2,10 +2,12 @@ #include "stdafx.h" //#endif +#include + #include "SlipSerial.h" #include - +#include enum SlipState{ SlipNormal, SlipEscaped, @@ -40,8 +42,15 @@ int state = SlipNormal; + int now; + int start = time(0); + while ( /*bytesReady() >0 &&*/ state != SlipStopped) { + now = time(0); + if ( (now - start)>3) + throw timeout_error("readFrame() timed out"); + int c = readByte(); if (c == -1) {