![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
V.06 11/3
Dependencies: FT6206 SDFileSystem SPI_TFT_ILI9341 TFT_fonts
Fork of ATT_AWS_IoT_demo by
Diff: AWS_openssl/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_mbed_os/openssl/network.cpp
- Revision:
- 18:6370da1de572
- Parent:
- 16:02008a2a2569
- Child:
- 23:b9ff83dc965f
diff -r 46780b2de3e4 -r 6370da1de572 AWS_openssl/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_mbed_os/openssl/network.cpp --- a/AWS_openssl/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_mbed_os/openssl/network.cpp Fri Dec 02 22:49:17 2016 +0000 +++ b/AWS_openssl/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_mbed_os/openssl/network.cpp Tue Dec 06 22:31:15 2016 +0000 @@ -2,6 +2,7 @@ * @file timer.c * @brief mbed-os implementation of the network interface needed for AWS. */ +#include <stdlib.h> /* atoi */ #include "network_interface.h" #include "EthernetInterface.h" @@ -60,7 +61,7 @@ /* Connect to the server */ INFO("Connecting with %s\r\n", host); - ret = _tcpsocket->connect(host, AWS_IOT_MQTT_PORT); + ret = _tcpsocket->connect(host, atoi(port)); return ret; } @@ -129,8 +130,7 @@ int ret; INFO("...Connecting with %s", host); - ret = _tcpsocket->connect(host, AWS_IOT_MQTT_PORT); - _tcpsocket->bind(host, AWS_IOT_MQTT_PORT); + ret = _tcpsocket->connect(host, atoi(port)); if (ret != NSAPI_ERROR_OK) { ERROR("Failed to connect"); return ret;