Skip to content

Commit eb48c0c

Browse files
author
Arto Kinnunen
authored
Ensure Nanostack is initialised before using it (#192)
Nanostack initialisation will occur after the first call to: Nanostack::get_instance Set file system root path after Nanostack initialisation.
1 parent b76b891 commit eb48c0c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mesh_nvm.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
#include "mbed.h"
18+
#include "Nanostack.h"
1819

1920
/* Application configuration values from json */
2021
#define MESH_LOWPAN 1
@@ -68,7 +69,9 @@ void mesh_nvm_initialize()
6869
}
6970

7071
if (!mount_status) {
72+
Nanostack::get_instance(); // ensure Nanostack is initialised
7173
ns_file_system_set_root_path("/fs/");
74+
// Should be like: Nanostack::get_instance().file_system_set_root_path("/fs/");
7275
}
7376
}
7477

0 commit comments

Comments
 (0)