if (!info)
break;
- if (_bt_get_error_code(param->result) == BT_ERROR_NONE)
+ if (_bt_get_error_code(param->result) == BT_ERROR_NONE) {
BT_INFO("Mesh: Remote Node Browsing: SUCCESS");
- else
- BT_INFO("Mesh: Remote Node Browsing: Failed");
- node_s = _bt_mesh_remote_node_browsed(res->net_uuid, res->dev_uuid,
- res->unicast, res->count);
-
- ((bt_mesh_node_discover_status_cb)
- bt_event_slot_container[event_index].callback)
+ node_s = _bt_mesh_remote_node_browsed(res->net_uuid, res->dev_uuid,
+ res->unicast, res->count);
+ ((bt_mesh_node_discover_status_cb)
+ bt_event_slot_container[event_index].callback)
(_bt_get_error_code(param->result), (bt_mesh_network_h) info,
- (bt_mesh_node_h) node_s,
- bt_event_slot_container[event_index].user_data);
+ (bt_mesh_node_h) node_s,
+ bt_event_slot_container[event_index].user_data);
+ } else {
+ BT_INFO("Mesh: Remote Node Browsing: FAILED");
+ ((bt_mesh_node_discover_status_cb)
+ bt_event_slot_container[event_index].callback)
+ (_bt_get_error_code(param->result), (bt_mesh_network_h) info,
+ NULL, bt_event_slot_container[event_index].user_data);
+ }
break;
} case BLUETOOTH_EVENT_MESH_NODE_VENDOR_FEATURES: {
BT_INFO("BLUETOOTH_EVENT_MESH_NODE_VENDOR_FEATURES");
if (!network_s)
break;
- if (_bt_get_error_code(param->result) == BT_ERROR_NONE)
- BT_INFO("Mesh: Node Vendor Features: SUCCESS");
- else
- BT_INFO("Mesh: Node Vendor Features: Failed");
node_s = _bt_mesh_remote_node_browsed(res->net_uuid, res->dev_uuid,
res->unicast, res->elem_count);
if (!node_s)
break;
- node_s->features.cid = res->vendor_info.companyid;
- node_s->features.pid = res->vendor_info.versionid;
- node_s->features.vid = res->vendor_info.vendorid;
- node_s->features.crpl = res->vendor_info.crpl;
-
- if (res->features.relay)
- node_s->features.features = BT_MESH_FEATURE_RELAY;
- if (res->features.proxy)
- node_s->features.features |= BT_MESH_FEATURE_PROXY;
- if (res->features.frnd)
- node_s->features.features |= BT_MESH_FEATURE_FRIEND;
- if (res->features.lpn)
- node_s->features.features |= BT_MESH_FEATURE_LOWPOWER;
-
- ((bt_mesh_node_features_cb)
- bt_event_slot_container[event_index].callback)
+
+ if (_bt_get_error_code(param->result) == BT_ERROR_NONE) {
+ BT_INFO("Mesh: Node Vendor Features: SUCCESS");
+ node_s->features.cid = res->vendor_info.companyid;
+ node_s->features.pid = res->vendor_info.versionid;
+ node_s->features.vid = res->vendor_info.vendorid;
+ node_s->features.crpl = res->vendor_info.crpl;
+
+ if (res->features.relay)
+ node_s->features.features = BT_MESH_FEATURE_RELAY;
+ if (res->features.proxy)
+ node_s->features.features |= BT_MESH_FEATURE_PROXY;
+ if (res->features.frnd)
+ node_s->features.features |= BT_MESH_FEATURE_FRIEND;
+ if (res->features.lpn)
+ node_s->features.features |= BT_MESH_FEATURE_LOWPOWER;
+
+ ((bt_mesh_node_features_cb)
+ bt_event_slot_container[event_index].callback)
(_bt_get_error_code(param->result), (bt_mesh_node_h) node_s,
- (bt_mesh_node_features_s*)&node_s->features,
- bt_event_slot_container[event_index].user_data);
+ (bt_mesh_node_features_s*)&node_s->features,
+ bt_event_slot_container[event_index].user_data);
+ } else {
+ BT_INFO("Mesh: Node Vendor Features: FAILED");
+ ((bt_mesh_node_features_cb)
+ bt_event_slot_container[event_index].callback)
+ (_bt_get_error_code(param->result), (bt_mesh_node_h) node_s,
+ NULL, bt_event_slot_container[event_index].user_data);
+ }
break;
} case BLUETOOTH_EVENT_MESH_NODE_KEY_CONFIGURED : {
BT_INFO("BLUETOOTH_EVENT_MESH_NODE_KEY_CONFIGURED");