Skip to content

Commit b29ce22

Browse files
LingaoMcfriedt
authored andcommitted
Bluetooth: Mesh: Fix incorrect write conn_count
When Device use pb-gatt bearer provisioning, and first provisioning failed due to some reasons(invalid oob etc..). Which cause `proxy:gatt_disconnectd` incorrected write `conn_count` Cause this var euqals `-1`. Signed-off-by: Lingao Meng <[email protected]>
1 parent 1bd54d6 commit b29ce22

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

subsys/bluetooth/mesh/proxy_srv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,10 +880,9 @@ static void gatt_disconnected(struct bt_conn *conn, uint8_t reason)
880880
return;
881881
}
882882

883-
conn_count--;
884-
885883
client = find_client(conn);
886884
if (client->cli) {
885+
conn_count--;
887886
bt_mesh_proxy_role_cleanup(client->cli);
888887
client->cli = NULL;
889888
}

0 commit comments

Comments
 (0)