Socket interface for C027Interface. Implements the NetworkSocketAPI

Dependencies:   C027_Support

Dependents:   HelloC027Interface U_Blox_DeviceConnector U_Blox_DeviceConnector U-Blox_Client

Fork of LWIPInterface by NetworkSocketAPI

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Thu Apr 20 09:04:44 2017 -0500
Parent:
22:69ea34ad7fc6
Commit message:
Only join a running threat. Zero initialise callback array.

Changed in this revision

C027Interface.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 69ea34ad7fc6 -r 5e320842ccad C027Interface.cpp
--- a/C027Interface.cpp	Mon Mar 27 15:54:45 2017 -0500
+++ b/C027Interface.cpp	Thu Apr 20 09:04:44 2017 -0500
@@ -24,12 +24,14 @@
     : _debug(debug)
 {
     strcpy(_pin, simpin);
+    memset(_cbs, 0, sizeof(_cbs));
     running = false;
 }
 
 C027Interface::~C027Interface()
 {
-	_thread.join();
+	if(running)
+        _thread.join();
 }
 
 nsapi_error_t C027Interface::set_credentials(const char *apn, const char *username, const char *password)