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:
57:b017388f1aa3
Parent:
54:dfee8691c83a
Child:
58:7a2df2ce591e
--- a/source/Utils.cpp	Tue Aug 09 18:47:59 2016 +0000
+++ b/source/Utils.cpp	Tue Aug 09 19:06:23 2016 +0000
@@ -150,6 +150,17 @@
 		
 		// parse
 		sscanf(buffer,"%s%s%d",uri,path,(int *)&port);
+		
+		// IPv6 kludge until we parse it properly...
+		if (strcmp(uri,"coaps") == 0 && strcmp(path,"2607") == 0) {
+			// IPv6 in use - so nail to Connector's IPv6 address
+			strcpy(uri,"coap");
+			strcpy(path,"2607:f0d0:2601:52::20");
+			port = default_port;
+			
+			// DEBUG
+			logger.log("Endpoint: Connector IPV6 uri: %s path: %s port: %d",uri,path,port);
+		}
 	}
 	
 	// DEBUG