Skip to content

Commit e32ee67

Browse files
Cruz Monrreal IICruz Monrreal II
authored andcommitted
Merge pull request ARMmbed#9971 from KariHaapalehto/status_callback
Correct thread status callback functionality
2 parents bbcba31 + d944836 commit e32ee67

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

features/nanostack/mbed-mesh-api/source/ThreadInterface.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ nsapi_error_t Nanostack::ThreadInterface::bringup(bool dhcp, const char *ip,
147147
// -end devices will get connectivity once attached to existing network
148148
// -devices without network settings gets connectivity once commissioned and attached to network
149149
_connect_status = NSAPI_STATUS_CONNECTING;
150-
if (_connection_status_cb) {
151-
_connection_status_cb(NSAPI_EVENT_CONNECTION_STATUS_CHANGE, NSAPI_STATUS_CONNECTING);
152-
}
153150
if (_blocking) {
154151
int32_t count = connect_semaphore.wait(osWaitForever);
155152

features/nanostack/mbed-mesh-api/source/thread_tasklet.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,7 @@ void thread_tasklet_poll_network_status(void *param)
245245
}
246246
}
247247
} else {
248-
if (thread_tasklet_data_ptr->connection_status != MESH_DISCONNECTED &&
249-
thread_tasklet_data_ptr->connection_status != MESH_BOOTSTRAP_STARTED) {
250-
thread_tasklet_network_state_changed(MESH_DISCONNECTED);
251-
}
248+
thread_tasklet_data_ptr->connection_status = MESH_DISCONNECTED;
252249
}
253250
}
254251

0 commit comments

Comments
 (0)