use TCP to connect to mbed connector

Fork of mbedConnectorInterfaceWithDM by Doug Anson

Revision:
85:ad357f0a48d2
Parent:
84:e5f53e7492cb
Child:
86:89977e288213
--- a/source/ConnectorEndpoint.cpp	Fri Nov 04 23:31:14 2016 +0000
+++ b/source/ConnectorEndpoint.cpp	Fri Nov 04 23:33:59 2016 +0000
@@ -297,7 +297,7 @@
 #ifdef ENABLE_MBED_CLOUD_SUPPORT
 // mbed-cloud-client: Callback from mbed client stack if any error is encountered
 void Endpoint::on_error(int error_code) {
-	char *error = "No Error";
+	char *error = (char *)"No Error";
 	switch(error_code) {
         case 0x01:
             error = (char *)"MbedCloudClient::IdentityError";
@@ -371,7 +371,7 @@
         default:
             error = (char *)"UNKNOWN";
     }
-    this->logger()->log("Connector::Endpoint(Cloud) Error(%x): %s",error_code,error);
+    printf("Connector::Endpoint(Cloud) Error(%x): %s\r\n",error_code,error);
 }
 #else
 // mbed-client: Callback from mbed client stack if any error is encountered
@@ -464,25 +464,22 @@
 #ifdef ENABLE_MBED_CLOUD_SUPPORT
 // object registered
 void Endpoint::on_registered()  {
-	const M2MServer server;
 	if (__endpoint != NULL) {
-		__endpoint->object_registered(NULL,server);
+		__endpoint->object_registered(NULL,(const M2MServer &)NULL);
 	}
 }
 
 // registration updated
 void Endpoint::on_registration_updated()  {
-	const M2MServer server;
 	if (__endpoint != NULL) {
-		__endpoint->registration_updated(NULL,server);
+		__endpoint->registration_updated(NULL,(const M2MServer &)NULL);
 	}
 }
 
 // object unregistered
 void Endpoint::on_unregistered()  {
-	const M2MServer server;
 	if (__endpoint != NULL) {
-		__endpoint->object_unregistered(NULL,server);
+		__endpoint->object_unregistered(NULL,(const M2MServer &)NULL);
 	}
 }
 #endif