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

pull/6634/head
lly 2021-02-07 11:12:25 +08:00
rodzic d1cc9e98b7
commit d3cc004803
3 zmienionych plików z 24 dodań i 0 usunięć

Wyświetl plik

@ -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;

Wyświetl plik

@ -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;

Wyświetl plik

@ -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;