detailed error message

This commit is contained in:
rusefi 2020-07-04 17:22:27 -04:00
parent 008e8d55c1
commit bd2f4736fa
1 changed files with 3 additions and 2 deletions

View File

@ -319,7 +319,7 @@ static void handleGetStructContent(ts_channel_s *tsChannel, int structId, int si
// Returns true if an overrun would occur.
static bool validateOffsetCount(size_t offset, size_t count, ts_channel_s *tsChannel) {
if (offset + count > getTunerStudioPageSize()) {
scheduleMsg(&tsLogger, "TS: Project mismatch? Too much data requested %d/%d", offset, count);
scheduleMsg(&tsLogger, "TS: Project mismatch? Too much configuration requested %d/%d", offset, count);
tunerStudioError("ERROR: out of range");
sendErrorCode(tsChannel);
return true;
@ -648,7 +648,8 @@ void handleQueryCommand(ts_channel_s *tsChannel, ts_response_format_e mode) {
*/
static void handleOutputChannelsCommand(ts_channel_s *tsChannel, ts_response_format_e mode, uint16_t offset, uint16_t count) {
if (offset + count > sizeof(TunerStudioOutputChannels)) {
scheduleMsg(&tsLogger, "TS: Version Mismatch? Too much data requested %d+%d", offset, count);
scheduleMsg(&tsLogger, "TS: Version Mismatch? Too much outpus requested %d/%d/%d", offset, count,
sizeof(TunerStudioOutputChannels));
sendErrorCode(tsChannel);
return;
}