ble_mesh: stack: Fix deinit server models with no matching id

This commit is contained in:
lly 2021-02-07 11:12:25 +08:00
parent d8082b7f39
commit 19a578c2e0
3 changed files with 24 additions and 0 deletions

View File

@ -2666,6 +2666,18 @@ static int generic_server_deinit(struct bt_mesh_model *model)
}
break;
}
case BLE_MESH_MODEL_ID_GEN_DEF_TRANS_TIME_SRV:
case BLE_MESH_MODEL_ID_GEN_POWER_ONOFF_SRV:
case BLE_MESH_MODEL_ID_GEN_POWER_ONOFF_SETUP_SRV:
case BLE_MESH_MODEL_ID_GEN_POWER_LEVEL_SETUP_SRV:
case BLE_MESH_MODEL_ID_GEN_BATTERY_SRV:
case BLE_MESH_MODEL_ID_GEN_LOCATION_SRV:
case BLE_MESH_MODEL_ID_GEN_LOCATION_SETUP_SRV:
case BLE_MESH_MODEL_ID_GEN_USER_PROP_SRV:
case BLE_MESH_MODEL_ID_GEN_ADMIN_PROP_SRV:
case BLE_MESH_MODEL_ID_GEN_MANUFACTURER_PROP_SRV:
case BLE_MESH_MODEL_ID_GEN_CLIENT_PROP_SRV:
break;
default:
BT_WARN("Unknown Generic Server, model id 0x%04x", model->id);
return -EINVAL;

View File

@ -3438,6 +3438,12 @@ static int light_server_deinit(struct bt_mesh_model *model)
}
break;
}
case BLE_MESH_MODEL_ID_LIGHT_LIGHTNESS_SETUP_SRV:
case BLE_MESH_MODEL_ID_LIGHT_CTL_SETUP_SRV:
case BLE_MESH_MODEL_ID_LIGHT_HSL_SETUP_SRV:
case BLE_MESH_MODEL_ID_LIGHT_XYL_SETUP_SRV:
case BLE_MESH_MODEL_ID_LIGHT_LC_SETUP_SRV:
break;
default:
BT_WARN("Unknown Light Server, model id 0x%04x", model->id);
return -EINVAL;

View File

@ -1446,6 +1446,12 @@ static int time_scene_server_deinit(struct bt_mesh_model *model)
}
break;
}
case BLE_MESH_MODEL_ID_TIME_SRV:
case BLE_MESH_MODEL_ID_TIME_SETUP_SRV:
case BLE_MESH_MODEL_ID_SCENE_SETUP_SRV:
case BLE_MESH_MODEL_ID_SCHEDULER_SRV:
case BLE_MESH_MODEL_ID_SCHEDULER_SETUP_SRV:
break;
default:
BT_WARN("Unknown Time Scene Server, model id 0x%04x", model->id);
return -EINVAL;