Merge pull request #9971 from KariHaapalehto/status_callback

Correct thread status callback functionality
pull/10267/head
Cruz Monrreal 2019-03-28 17:05:34 -05:00 committed by GitHub
commit 48c78ae79a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 7 deletions

View File

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

View File

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