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 2021/02/23 14:38:22 UTC

[GitHub] [mynewt-nimble] michal-narajowski commented on a change in pull request #921: various small fixes (mesh, host, controller)

michal-narajowski commented on a change in pull request #921:
URL: https://github.com/apache/mynewt-nimble/pull/921#discussion_r581080951



##########
File path: nimble/host/mesh/src/friend.c
##########
@@ -1224,7 +1224,6 @@ 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;

Review comment:
       This is a typo. The second line should be `frags` and you should set it to NULL (this is how it looks in Zephyr). And we should not erase the first line. We need to double-check this.

##########
File path: nimble/host/mesh/src/testing.c
##########
@@ -171,7 +171,9 @@ void bt_test_print_credentials(void)
 		console_printf("Friend cred: %d\n", i);
 		console_printf("\tNetKeyIdx: %04x\n",
 			           sub[i].net_idx);
-		console_printf("\tNID: %02x\n", subnet->keys->msg.nid);
+		if (subnet) {
+            console_printf("\tNID: %02x\n", subnet->keys->msg.nid);
+        }

Review comment:
       What about the next line? And indentation.

##########
File path: nimble/host/mesh/src/adv.c
##########
@@ -232,8 +232,8 @@ struct os_mbuf *bt_mesh_adv_create_from_pool(struct os_mbuf_pool *pool,
 	adv->ref_cnt = 1;
 	ble_npl_event_set_arg(&adv->ev, buf);
 
-	return buf;
 	os_mbuf_free_chain(buf);
+    return buf;

Review comment:
       Indentation.




----------------------------------------------------------------
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