Host library for controlling a WiConnect enabled Wi-Fi module.

Dependents:   wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more

Revision:
8:1fad4ca6c6a4
Parent:
7:41d456a65f14
Child:
11:ea484e1b7fc4
--- a/internal/network/NetworkJoin.cpp	Mon Aug 11 16:16:02 2014 -0700
+++ b/internal/network/NetworkJoin.cpp	Mon Aug 11 16:30:38 2014 -0700
@@ -114,18 +114,18 @@
 
 #ifdef WICONNECT_ASYNC_TIMER_ENABLED
 
-static char joinStatusMonitor_responseBuffer[4];
-static uint8_t joinStatusMonitor_cmdBuffer[sizeof(QueuedCommand)];
 
 /*************************************************************************************************/
 // this is called every 1s by the monitorTimer
 void NetworkInterface::joinStatusMonitor()
 {
-    QueuedCommand *cmd = (QueuedCommand*)joinStatusMonitor_cmdBuffer;
+    static char responseBuffer[4];
+    static uint8_t cmdBuffer[sizeof(QueuedCommand)];
+    QueuedCommand *cmd = (QueuedCommand*)cmdBuffer;
 
     monitorTimer.stop();
 
-   *cmd = QueuedCommand(sizeof(joinStatusMonitor_responseBuffer), joinStatusMonitor_responseBuffer, "get network.status");
+   *cmd = QueuedCommand(sizeof(responseBuffer), responseBuffer, "get network.status");
 
     wiconnect->enqueueCommand(cmd, Callback(this, &NetworkInterface::joinStatusCheckCallback));
 }