Change-Id: Ic678d8d880e0473d738f83dd6d4b21f379a9bd9c
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
}
l1 = g_slist_find_custom(app->elements,
GUINT_TO_POINTER(src_elem_idx), __compare_element_index);
}
l1 = g_slist_find_custom(app->elements,
GUINT_TO_POINTER(src_elem_idx), __compare_element_index);
+ if (!l1)
+ return BT_STATUS_FAIL;
elem = l1->data;
req = l_new(struct key_config_request, 1);
elem = l1->data;
req = l_new(struct key_config_request, 1);
param.sub_addr = addr;
param.model = mod_id;
BT_INFO("Subscr Addr\t%4.4x\n", addr);
param.sub_addr = addr;
param.model = mod_id;
BT_INFO("Subscr Addr\t%4.4x\n", addr);
- __mesh_handle_model_subscription_event(result, ¶m, cmd);
+
+ if (cmd)
+ __mesh_handle_model_subscription_event(result, ¶m, cmd);
+
break;
}
case MESH_OPCODE_CONFIG_DEFAULT_TTL_STATUS: {
break;
}
case MESH_OPCODE_CONFIG_DEFAULT_TTL_STATUS: {