Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ESP8266Interface by
Diff: ESP8266Interface.cpp
- Revision:
- 30:c19f1e61063b
- Parent:
- 29:f2ae8f47729b
- Child:
- 33:276cb279df57
diff -r f2ae8f47729b -r c19f1e61063b ESP8266Interface.cpp --- a/ESP8266Interface.cpp Thu Aug 27 14:32:50 2015 +0000 +++ b/ESP8266Interface.cpp Mon Dec 28 05:39:05 2015 +0000 @@ -16,7 +16,7 @@ #include "ESP8266Interface.h" -ESP8266Interface::ESP8266Interface(PinName tx, PinName rx) : esp8266(tx, rx) +ESP8266Interface::ESP8266Interface(PinName tx, PinName rx, uint8_t trace) : esp8266(tx, rx, trace) { uuidCounter = 0; std::fill_n(availableID, sizeof(availableID)/sizeof(int), -1); @@ -66,9 +66,11 @@ if (!esp8266.disconnect()) { return -1; } - for(int i=0; i<numSockets; i++) { + for (int i=0; i<numSockets; i++) { SocketInterface *socket = sockets[availableID[i]]; - deallocateSocket(socket); + if (socket) { + deallocateSocket(socket); + } } return 0; }