mesh: Fix typos in flags/frags

This commit is contained in:
Krzysztof Kopyściński
2021-05-27 10:19:29 +02:00
committed by Michał Narajowski
parent 56838dd935
commit a62a2e37cc
2 changed files with 7 additions and 1 deletions
+3
View File
@@ -35,6 +35,9 @@ typedef void (*bt_mesh_adv_func_t)(struct os_mbuf *buf, uint16_t duration,
int err, void *user_data);
struct bt_mesh_adv {
struct net_buf *frags;
const struct bt_mesh_send_cb *cb;
void *cb_data;
+4 -1
View File
@@ -125,6 +125,7 @@ static void purge_buffers(struct net_buf_slist_t *list)
while (!net_buf_slist_is_empty(list)) {
struct os_mbuf *buf;
buf = (void *)net_buf_slist_get(list);
BT_MESH_ADV(buf)->frags = NULL;
BT_MESH_ADV(buf)->flags &= ~NET_BUF_FRAGS;
net_buf_unref(buf);
}
@@ -1235,7 +1236,7 @@ static void friend_timeout(struct ble_npl_event *work)
/* Clear the flag we use for segment tracking */
BT_MESH_ADV(frnd->last)->flags &= ~NET_BUF_FRAGS;
BT_MESH_ADV(frnd->last)->flags = 0;
BT_MESH_ADV(frnd->last)->frags = 0;
BT_DBG("Sending buf %p from Friend Queue of LPN 0x%04x",
frnd->last, frnd->lpn);
@@ -1381,6 +1382,7 @@ static void friend_purge_old_ack(struct bt_mesh_friend *frnd, uint64_t *seq_auth
net_buf_slist_remove(&frnd->queue, prev, cur);
frnd->queue_size--;
BT_MESH_ADV(buf)->frags = 0;
net_buf_unref(buf);
break;
@@ -1622,6 +1624,7 @@ static bool friend_queue_prepare_space(struct bt_mesh_friend *frnd, uint16_t add
BT_DBG("PENDING SEGMENTS %d", pending_segments);
/* Make sure old slist entry state doesn't remain */
BT_MESH_ADV(buf)->frags = NULL;
BT_MESH_ADV(buf)->flags &= ~NET_BUF_FRAGS;
net_buf_unref(buf);