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 2019/06/04 09:48:17 UTC
[GitHub] [mynewt-nimble] jhedberg commented on a change in pull request
#457: nimble/mesh: Fix missing SAR timeout in Proxy Server
jhedberg commented on a change in pull request #457: nimble/mesh: Fix missing SAR timeout in Proxy Server
URL: https://github.com/apache/mynewt-nimble/pull/457#discussion_r290214547
##########
File path: nimble/host/mesh/src/proxy.c
##########
@@ -401,6 +404,21 @@ static void proxy_send_beacons(struct ble_npl_event *work)
}
}
+static void proxy_sar_timeout(struct ble_npl_event *work)
+{
+ struct bt_mesh_proxy_client *client;
+ int rc;
+
+ client = ble_npl_event_get_arg(work);
+ assert(client != NULL);
+
+ if ((client->conn_handle != BLE_HS_CONN_HANDLE_NONE)) {
Review comment:
Wouldn't it be better to cancel the delayed work in the disconnected callback? Otherwise you risk the client object getting reused with another valid handle by the time the timeout expires.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services