Merge pull request #7033 from AriParkkila/cellular-at-fix

Cellular: Fix AT URC handler not to dismiss incoming chars
pull/6752/merge
Cruz Monrreal 2018-05-29 10:44:00 -05:00 committed by GitHub
commit 0f41831afd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -280,21 +280,19 @@ void ATHandler::process_oob()
if (!(_fileHandle->readable() || (_recv_pos < _recv_len))) {
break; // we have nothing to read anymore
}
_start_time = rtos::Kernel::get_ms_count(); // time to process next (potential) URC
} else if (mem_str(_recv_buff, _recv_len, CRLF, CRLF_LENGTH)) { // If no match found, look for CRLF and consume everything up to CRLF
consume_to_tag(CRLF, true);
} else {
if (!fill_buffer()) {
reset_buffer(); // consume anything that could not be handled
break;
}
_start_time = rtos::Kernel::get_ms_count();
}
}
_at_timeout = timeout;
}
tr_debug("process_oob exit");
flush(); // consume anything that could not be handled
unlock();
}