mesh: if proxy server is not enabled, return status ADVERTISEMENTS NOT SUPPORTED in node identity status message

This commit is contained in:
Milanka Ringwald 2019-06-03 14:28:17 +02:00 committed by Matthias Ringwald
parent 7bd12f9f48
commit fb817b0522

View File

@ -59,6 +59,7 @@
// #define ENABLE_MESH_ADV_BEARER
// #define ENABLE_MESH_PB_ADV
#define ENABLE_MESH_PROXY_SERVER
#define ENABLE_MESH_PB_GATT
@ -2566,11 +2567,13 @@ static void config_node_identity_status(mesh_model_t *mesh_model, uint16_t netke
if (network_key == NULL){
status = MESH_FOUNDATION_STATUS_INVALID_NETKEY_INDEX;
} else {
#ifdef ENABLE_MESH_PROXY_SERVER
if (network_key->node_id_advertisement_running == 0){
state = MESH_FOUNDATION_NODE_IDENTITY_STATE_ADVERTISING_STOPPED;
} else {
state = MESH_FOUNDATION_NODE_IDENTITY_STATE_ADVERTISING_RUNNING;
}
#endif
}
// setup message