Skip to content

Commit 7f95241

Browse files
committed
Merge pull request #224 from ARMmbed/ns_sem
Move Nanostack connect semaphore into object
2 parents 2b46b5a + 4eb394e commit 7f95241

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

net/nanostack-interface/NanostackInterface.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ class NanostackSocket {
107107
socket_mode_t mode;
108108
};
109109

110-
static Semaphore connect_semaphore(0);
111-
static NanostackSocket * socket_tbl[NS_INTERFACE_SOCKETS_MAX] = {0};
110+
static NanostackSocket * socket_tbl[NS_INTERFACE_SOCKETS_MAX];
112111

113112
static int map_mesh_error(mesh_error_t err)
114113
{

net/nanostack-interface/NanostackInterface.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
class NanostackInterface : public MeshInterface, public NetworkStack {
1515
public:
16+
NanostackInterface() : connect_semaphore(0) { }
1617
int disconnect();
1718

1819
/** Get the internally stored IP address
@@ -226,6 +227,7 @@ class NanostackInterface : public MeshInterface, public NetworkStack {
226227
uint8_t eui64[8];
227228
char ip_addr_str[40];
228229
char mac_addr_str[24];
230+
Semaphore connect_semaphore;
229231
};
230232

231233
class LoWPANNDInterface : public NanostackInterface {

0 commit comments

Comments
 (0)