Merge branch 'bugfix/ble_mesh_server_model_deinit_v4.0' into 'release/v4.0'

ble_mesh: stack: Fix deinit server models with no matching id (v4.0)

See merge request espressif/esp-idf!12315
This commit is contained in:
Island 2021-02-09 16:25:05 +08:00
commit d1c9216602
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; 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: default:
BT_WARN("Unknown Generic Server, model id 0x%04x", model->id); BT_WARN("Unknown Generic Server, model id 0x%04x", model->id);
return -EINVAL; return -EINVAL;

View File

@ -3438,6 +3438,12 @@ static int light_server_deinit(struct bt_mesh_model *model)
} }
break; 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: default:
BT_WARN("Unknown Light Server, model id 0x%04x", model->id); BT_WARN("Unknown Light Server, model id 0x%04x", model->id);
return -EINVAL; return -EINVAL;

View File

@ -1446,6 +1446,12 @@ static int time_scene_server_deinit(struct bt_mesh_model *model)
} }
break; 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: default:
BT_WARN("Unknown Time Scene Server, model id 0x%04x", model->id); BT_WARN("Unknown Time Scene Server, model id 0x%04x", model->id);
return -EINVAL; return -EINVAL;