mbed Connector Interface simplification API on top of mbed-client

Fork of mbedConnectorInterfaceV3 by Doug Anson

NOTE:

This repo has been replaced with https://github.com/ARMmbed/mbedConnectorInterface. No further updates will occur with this repo. Please use the github repo instead. Thanks!

Revision:
59:dd395412bd19
Parent:
54:dfee8691c83a
Child:
60:0d9e607dd678
--- a/source/ConnectorEndpoint.cpp	Tue Aug 09 19:13:20 2016 +0000
+++ b/source/ConnectorEndpoint.cpp	Tue Aug 09 23:29:30 2016 +0000
@@ -182,7 +182,16 @@
 	
 	// Network Type IPv4 or IPv6
 	M2MInterface::NetworkStack ip_address_type = M2MInterface::LwIP_IPv4;
-	if (this->m_options->getIPAddressType() == IP_ADDRESS_TYPE_IPV6) ip_address_type = M2MInterface::LwIP_IPv6;
+	if (this->m_options->getIPAddressType() == IP_ADDRESS_TYPE_IPV6) {
+		ip_address_type = M2MInterface::LwIP_IPv6;
+		
+		// OVERRIDE (until patched in mbed-client)
+#if defined (IPV4_OVERRIDE)
+		// mbed-client does not support IPv6 directly... so we have to reset this back
+		this->logger()->log("Connector::Endpoint: IP Address Type: IPv4 (IPv6 OVERRIDE)");
+		ip_address_type = M2MInterface::LwIP_IPv4;
+#endif
+	}
 	
 	// DEBUG
 	if (network_protocol == M2MInterface::TCP) this->logger()->log("Connector::Endpoint: Underlying Protocol: TCP");