mirror of https://github.com/ARMmbed/mbed-os.git
Nanostack network handle does not always call status cb for BOOTSTRAP events
UBLOX_EVK_ODIN_W2 advertises more events than we expect. 1) When disconnecting first network connectivity is lost and then an actual disconnection event arrives. The first one is unexpected. 2) When reconnecting MESH_BOOTSTRAP_START_FAILED shows up, but the board eventually manages to connectpull/10434/head
parent
0b7d9af4dd
commit
8d1edc7db8
|
@ -149,8 +149,9 @@ void Nanostack::Interface::network_handler(mesh_connection_status_t status)
|
|||
_connect_status = NSAPI_STATUS_DISCONNECTED;
|
||||
}
|
||||
|
||||
if (_connection_status_cb && _previous_connection_status != _connect_status) {
|
||||
|
||||
if (_connection_status_cb && _previous_connection_status != _connect_status
|
||||
&& (_previous_connection_status != NSAPI_STATUS_GLOBAL_UP || status != MESH_BOOTSTRAP_STARTED)
|
||||
&& (_previous_connection_status != NSAPI_STATUS_CONNECTING || status != MESH_BOOTSTRAP_START_FAILED)) {
|
||||
_connection_status_cb(NSAPI_EVENT_CONNECTION_STATUS_CHANGE, _connect_status);
|
||||
}
|
||||
_previous_connection_status = _connect_status;
|
||||
|
|
Loading…
Reference in New Issue