net: Fix frame count check fail

bc_rxtail/rxtail should always point to newly frame.
If input more than one frame before receive,
missing assignment can result in old frame lost.

Signed-off-by: larry <larry@transtekcorp.com>
This commit is contained in:
larry
2022-07-13 14:02:04 +08:00
committed by Petro Karashchenko
parent e77b06721b
commit 8f72799e8e
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -129,6 +129,8 @@ static int bluetooth_queue_frame(FAR struct bluetooth_conn_s *conn,
conn->bc_rxtail->bn_flink = container;
}
conn->bc_rxtail = container;
#if CONFIG_NET_BLUETOOTH_BACKLOG > 0
/* If incrementing the count would exceed the maximum bc_backlog value,
* then delete the oldest frame from the head of the RX queue.