This library controls the WNC. There is a derived class for usage from the K64F board.

Fork of WncControllerLibrary by Fred Kellerman

Revision:
37:92acf8c20e6d
Parent:
36:d1a98d5f2bbd
--- a/WncController.cpp	Thu Apr 06 21:42:30 2017 -0400
+++ b/WncController.cpp	Fri Sep 15 23:28:54 2017 +0000
@@ -1620,10 +1620,12 @@
     str += "\"";
     r = sendWncCmd(str.c_str(), &pRespStr, WNC_DNS_RESOLVE_WAIT_MS);
     if (r == WNC_AT_CMD_OK && pRespStr->size() > 0) {
-        size_t pos_start = pRespStr->find(":\"") + 2;
+        size_t pos_start = pRespStr->find(":\"");
         if (pos_start !=  string::npos) {
-            size_t pos_end = pRespStr->find("\"", pos_start) - 1;
+            pos_start += 2;
+            size_t pos_end = pRespStr->find("\"", pos_start);
             if (pos_end != string::npos) {
+                pos_end -= 1;
                 if (pos_end > pos_start) {
                     // Make a copy for use later (the source string is re-used)
                     *ipStr = pRespStr->substr(pos_start, pos_end - pos_start + 1);