for (i = 0; i < netkeys->len; i++) {
bt_mesh_netkey_s *netkey_local;
netkey_idx = g_ptr_array_index(netkeys, i);
- BT_INFO("Mesh: NetKey IDX [0x%2.2x]", *netkey_idx);
if (netkey_idx) {
/* Check if netkey index is present in network or not */
+ BT_INFO("Mesh: NetKey IDX [%d]", *netkey_idx);
netkey_local = __bt_mesh_network_is_netkey_added(network_s, *netkey_idx);
if (!netkey_local) {
BT_ERR("Mesh: Network does not contain the netKey index, possibly reloaded");
for (i = 0; i < appkeys->len; i++) {
bt_mesh_appkey_s *appkey_local;
appkey_idx = g_ptr_array_index(appkeys, i);
- BT_INFO("Mesh: AppKey index [0x%2.2x]", *appkey_idx);
if (appkey_idx) {
- /* Check if netkey index is present in network or not */
+ /* Check if appkey index is present in network or not */
+ BT_INFO("Mesh: AppKey index [%d]", *appkey_idx);
appkey_local = __bt_mesh_network_is_appkey_added(network_s, netkey_s->netkey_index, *appkey_idx);
if (!appkey_local) {
BT_ERR("Mesh: Network does not AppKey index, possibly Network reloaded!!");
- /* Create Netkey object */
- appkey_local = g_malloc0(sizeof(bt_mesh_netkey_s));
+ /* Create Appkey object */
+ appkey_local = g_malloc0(sizeof(bt_mesh_appkey_s));
appkey_local->parent = netkey_s;
appkey_local->appkey_index = *appkey_idx;
netkey_s->appkeys = g_slist_append(netkey_s->appkeys, appkey_local);