if read returns zero, then return TIMEOUT_RESPONSE in all cases

pull/12/head
Tom Early 7 years ago
parent 2959a0ed83
commit e9293858e2

@ -404,6 +404,7 @@ MODEM_RESPONSE CQnetModem::GetModemData(unsigned char *buf, unsigned int size)
}
if (ret == 0) {
printf("READ DATA RETURNED A ZERO!\n");
return(TIMEOUT_RESPONSE);
} else
offset += ret;
}
@ -416,6 +417,7 @@ MODEM_RESPONSE CQnetModem::GetModemData(unsigned char *buf, unsigned int size)
return ERROR_RESPONSE;
} else if (ret == 0) {
printf("READ junk RETURNED A ZERO!\n");
return(TIMEOUT_RESPONSE);
} else {
junk_count -= (unsigned int)ret;
}

Loading…
Cancel
Save

Powered by TurnKey Linux.