mbed Connector Interface simplification API on top of mbed-client
Fork of mbedConnectorInterfaceV3 by
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!
Diff: source/Utils.cpp
- Revision:
- 53:d2f9f94b6000
- Parent:
- 46:62da4ce20276
- Child:
- 54:dfee8691c83a
diff -r 8abdfa69b511 -r d2f9f94b6000 source/Utils.cpp --- a/source/Utils.cpp Sat Jul 16 05:53:42 2016 +0000 +++ b/source/Utils.cpp Mon Aug 08 19:02:00 2016 +0000 @@ -153,14 +153,16 @@ for(int i=0;i<length;++i) { if (buffer[i] == ':') buffer[i] = ' '; if (buffer[i] == '/') buffer[i] = ' '; + if (buffer[i] == '[') buffer[i] = ' '; + if (buffer[i] == ']') buffer[i] = ' '; } // parse - sscanf(buffer,"%s %s %d",uri,path,(int *)&port); + sscanf(buffer,"%s%s%d",uri,path,(int *)&port); } // DEBUG - logger.log("Endpoint: CoAP port: %u",port); + logger.log("Endpoint: Connector URL: %s CoAP port: %u",url,port); // return the port return port;