hfp: handle multiple commands

This commit is contained in:
Milanka Ringwald 2021-08-10 11:12:53 +02:00
parent 184a03ed78
commit a7ba78b0d5

View File

@ -1343,13 +1343,13 @@ static void hfp_hf_handle_rfcomm_data(hfp_connection_t * hfp_connection, uint8_t
#endif
// process messages byte-wise
int pos;
uint8_t pos;
for (pos = 0; pos < size; pos++){
hfp_parse(hfp_connection, packet[pos], 1);
// parse until end of line "\r" or "\n"
if (!hfp_parser_is_end_of_line(packet[pos])) continue;
hfp_hf_handle_rfcomm_command(hfp_connection);
}
hfp_hf_handle_rfcomm_command(hfp_connection);
}
static void hfp_hf_run(void){