You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2022/04/19 09:48:36 UTC
[GitHub] [mynewt-nimble] KKopyscinski commented on pull request #1120: host/mesh: fix clients array indexing in proxy_srv
KKopyscinski commented on PR #1120:
URL: https://github.com/apache/mynewt-nimble/pull/1120#issuecomment-1102411039
> I think the right way would be keep handle in struct bt_mesh_proxy_client and don't make any assumptions on its value
I don't think it's possible: in `gatt_connected()` we need to find client that is not initialised (as it's being initialized right now). I see 2 solutions:
1. `find_client()` returns `clients[conn_handle - 1]` - this imo is fine because clients can always be mapped 1:1 by their conn handles
2. `find_client()` iterates through all elements of `clients` and returns instance with matching handle. We drop `find_client` in `gatt_connected` and do something like `client = &clients[conn_handle - 1]`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org