Work around Marinetti bug where TCPIPReadLineTCP could incorrectly return an error value.

This should now be fixed in the latest Marinetti, but we'll keep the workaround to minimize the chance of problems.
This commit is contained in:
Stephen Heumann 2019-07-15 16:28:03 -05:00
parent e7230aa80e
commit a235d3b0e2

3
http.c
View File

@ -149,11 +149,12 @@ netRetry:
LongWord startTime = GetTick(); LongWord startTime = GetTick();
do { do {
TCPIPPoll(); TCPIPPoll();
u.rlrBuff.rlrBuffCount = 0;
tcpError = TCPIPReadLineTCP(sess->ipid, tcpError = TCPIPReadLineTCP(sess->ipid,
(void*)((LongWord)"\p\r\n\r\n" | 0x80000000), (void*)((LongWord)"\p\r\n\r\n" | 0x80000000),
buffTypeNewHandle, (Ref)NULL, buffTypeNewHandle, (Ref)NULL,
0xFFFFFF, &u.rlrBuff); 0xFFFFFF, &u.rlrBuff);
if (tcpError || toolerror()) { if ((tcpError && u.rlrBuff.rlrBuffCount == 0) || toolerror()) {
if (netErrors == 0) { if (netErrors == 0) {
netErrors++; netErrors++;
goto netRetry; goto netRetry;