drivers: modem: hl7800: socket RX could drop data
net_buf_skipcrlf() will remove all \r\n characters from the buffer. If the data after CONNECT\r\n contained \r or \n it would be removed, resulting in dropped data. Fix this to only remove two bytes to ensure data is not dropped. Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
This commit is contained in:
parent
6ef958c2e1
commit
8d6832b256
1 changed files with 2 additions and 1 deletions
|
@ -2823,7 +2823,8 @@ static void sock_read(struct net_buf **buf, uint16_t len)
|
|||
/* wait for \n to be RXd. \r was already RXd. */
|
||||
wait_for_modem_data(buf, 0, 1);
|
||||
}
|
||||
net_buf_skipcrlf(buf);
|
||||
/* remove \r\n */
|
||||
net_buf_remove(buf, 2);
|
||||
if (!*buf) {
|
||||
wait_for_modem_data(buf, 0, sock->rx_size);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue