mirror of https://github.com/ARMmbed/mbed-os.git
Make Nanostack C++ constructor initialise Nanostack
Nanostack object constructor didn't actually initialise Nanostack. Nanostack initialisation was deferred until an interface was actually attached to the stack, which generally happened at first interface connect. Not normally a problem, unless you're trying to make direct Nanostack setup calls prior to connect - some applications do this, and were relying on ThreadInterface::initialise to do Nanostack initialisation. Unfortunately in 5.9 ThreadInterface::initialise no longer does initialise Nanostack immediately, because the mesh interfaces were aligned and integrated with the Ethernet interfaces, which did initialisation on connect(). Make the Nanostack object constructor initialise Nanostack (as the LWIP constructor does for lwIP), so calling Nanostack::get_instance() is the 5.9 API for Nanostack initialisation. For future work, APIs like ns_file_system_set_root_path should be exposed as methods of Nanostack, so everything happens with a single Nanostack::get_instance().file_system_set_root_path().pull/7173/head
parent
5d8570be39
commit
e06923c64a
|
@ -449,7 +449,7 @@ void NanostackSocket::event_connection_reset(socket_callback_t *sock_cb)
|
|||
Nanostack::Nanostack()
|
||||
: call_event_tasklet(-1)
|
||||
{
|
||||
|
||||
mesh_system_init();
|
||||
}
|
||||
|
||||
void Nanostack::call_event_tasklet_main(arm_event_s *event)
|
||||
|
|
Loading…
Reference in New Issue