michal-narajowski commented on a change in pull request #341: Additional Fix 
For Handling conn_handle=0
URL: https://github.com/apache/mynewt-nimble/pull/341#discussion_r255967281
 
 

 ##########
 File path: nimble/host/mesh/src/proxy.c
 ##########
 @@ -808,12 +808,13 @@ void bt_mesh_proxy_gatt_disconnect(void)
        for (i = 0; i < ARRAY_SIZE(clients); i++) {
                struct bt_mesh_proxy_client *client = &clients[i];
 
-               if (client->conn_handle && (client->filter_type == WHITELIST ||
-                                           client->filter_type == BLACKLIST)) {
-                       client->filter_type = NONE;
-                       rc = ble_gap_terminate(client->conn_handle,
+               if ((client->conn_handle != BLE_HS_CONN_HANDLE_NONE) &&
+                   (client->filter_type == WHITELIST ||
+                    client->filter_type == BLACKLIST)) {
+                           client->filter_type = NONE;
+                           rc = ble_gap_terminate(client->conn_handle,
                                               BLE_ERR_REM_USER_CONN_TERM);
-                       assert(rc == 0);
+                           assert(rc == 0);
 
 Review comment:
   You shouldn't change the indentation of the code here. Just the if condition.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to