Changelog since HylaFAX 4.2.3
+* prevent some faxgetty hangs in Phase C EOL sync (29 Nov 2005)
* fix for clients specifying TZONE LOCAL/GMT and using %Y for
JobFmt and RcvFmt (22 Nov 2005)
* 11 consecutive zero bits. This means that if EOLcnt
* is non-zero then we still need to scan for the final flag
* bit that is part of the EOL code.
+ *
+ * In order to prevent getting forever stuck in these loops
+ * (perhaps by a hung modem or hung sender) we raiseRTC if
+ * it appears to be the case.
*/
#define SYNC_EOL(eoflab) do { \
if (EOLcnt == 0) { \
- for (;;) { \
+ for (u_long i = 0;; i++) { \
NeedBits16(11,eoflab); \
if (GetBits(11) == 0) \
break; \
ClrBits(1); \
+ if (i > 150000) raiseRTC(); \
} \
} \
- for (;;) { \
+ for (u_long i = 0;; i++) { \
NeedBits8(8,eoflab); \
if (GetBits(8)) \
break; \
ClrBits(8); \
+ if (i > 150000) raiseRTC(); \
} \
while (GetBits(1) == 0) \
ClrBits(1); \