Bluetooth: Fix detection of colliding peer proc

A device is not allowed to start a new control procedure if it
has already responded to a peer procedure.

The detection of a response being present did not take into account
that some procedures do not have a response.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This commit is contained in:
Rubin Gerritsen 2022-10-27 22:12:24 +02:00 committed by AndersBroman
parent 96de1ce181
commit 887fc09100
1 changed files with 1 additions and 1 deletions

View File

@ -1452,7 +1452,7 @@ control_proc_invalid_collision(packet_info const *pinfo,
* That is, if there exists are response in the other procedure at this point in
* time, there is a procedure violation.
*/
if (control_proc_other->frames[1] < pinfo->num)
if (control_proc_other->frames[1] && (control_proc_other->frames[1] < pinfo->num))
return TRUE;
else
return FALSE;