mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #9971 from KariHaapalehto/status_callback
Correct thread status callback functionalitypull/10267/head
commit
48c78ae79a
|
|
@ -147,9 +147,6 @@ nsapi_error_t Nanostack::ThreadInterface::bringup(bool dhcp, const char *ip,
|
|||
// -end devices will get connectivity once attached to existing network
|
||||
// -devices without network settings gets connectivity once commissioned and attached to network
|
||||
_connect_status = NSAPI_STATUS_CONNECTING;
|
||||
if (_connection_status_cb) {
|
||||
_connection_status_cb(NSAPI_EVENT_CONNECTION_STATUS_CHANGE, NSAPI_STATUS_CONNECTING);
|
||||
}
|
||||
if (_blocking) {
|
||||
int32_t count = connect_semaphore.wait(osWaitForever);
|
||||
|
||||
|
|
|
|||
|
|
@ -245,10 +245,7 @@ void thread_tasklet_poll_network_status(void *param)
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (thread_tasklet_data_ptr->connection_status != MESH_DISCONNECTED &&
|
||||
thread_tasklet_data_ptr->connection_status != MESH_BOOTSTRAP_STARTED) {
|
||||
thread_tasklet_network_state_changed(MESH_DISCONNECTED);
|
||||
}
|
||||
thread_tasklet_data_ptr->connection_status = MESH_DISCONNECTED;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue