diff options
author | Steven Connell | 2018-10-11 17:28:23 -0500 |
---|---|---|
committer | Chris Ring | 2018-11-07 17:11:40 -0600 |
commit | 7742cd38455a7e2fc671b7bc323d77a19c30f401 (patch) | |
tree | e14863c07d838c1a92bd8bfa2eeef02c0fd1b2eb | |
parent | 06741a59b5fb7c560c769f1bc5260c6b670f32a0 (diff) | |
download | aws-iot-device-sdk-embedded-c-v3.0.1-ti-2.10.tar.gz aws-iot-device-sdk-embedded-c-v3.0.1-ti-2.10.tar.xz aws-iot-device-sdk-embedded-c-v3.0.1-ti-2.10.zip |
Quarterly update for AWS IoT 2.10 Pluginv3.0.1-ti-2.10.00v3.0.1-ti-2.10
This commit consolidates work done for the AWS IoT 2.10 Plugin
release, based on TI's SimpleLink 2.30 SDKs and Amazon's AWS IoT C SDK
v3.0.1.
It includes a few minor TI changes:
- Reset freed pointer to NULL to prevent later dereference (AWSIOT-56)
- Add an 'example starting' print before call to NTP (AWSIOT-58)
Signed-off-by: Chris Ring <cring@ti.com>
4 files changed, 17 insertions, 3 deletions
diff --git a/platform/tirtos/network_sl.c b/platform/tirtos/network_sl.c index 55d68a5..bb71c2c 100644 --- a/platform/tirtos/network_sl.c +++ b/platform/tirtos/network_sl.c | |||
@@ -277,10 +277,12 @@ QUIT: | |||
277 | if (ret != SUCCESS) { | 277 | if (ret != SUCCESS) { |
278 | if (tlsDataParams->secAttrib) { | 278 | if (tlsDataParams->secAttrib) { |
279 | SlNetSock_secAttribDelete(tlsDataParams->secAttrib); | 279 | SlNetSock_secAttribDelete(tlsDataParams->secAttrib); |
280 | tlsDataParams->secAttrib = NULL; | ||
280 | } | 281 | } |
281 | 282 | ||
282 | if (tlsDataParams->skt >= 0) { | 283 | if (tlsDataParams->skt >= 0) { |
283 | close(tlsDataParams->skt); | 284 | close(tlsDataParams->skt); |
285 | tlsDataParams->skt = -1; | ||
284 | } | 286 | } |
285 | } | 287 | } |
286 | 288 | ||
@@ -399,13 +401,19 @@ IoT_Error_t iot_tls_disconnect(Network *pNetwork) | |||
399 | 401 | ||
400 | IoT_Error_t iot_tls_destroy(Network *pNetwork) | 402 | IoT_Error_t iot_tls_destroy(Network *pNetwork) |
401 | { | 403 | { |
402 | if (pNetwork == NULL || pNetwork->tlsDataParams.skt == -1) { | 404 | if (pNetwork == NULL) { |
403 | return (NULL_VALUE_ERROR); | 405 | return (NULL_VALUE_ERROR); |
404 | } | 406 | } |
405 | 407 | ||
406 | close(pNetwork->tlsDataParams.skt); | 408 | if (pNetwork->tlsDataParams.skt >= 0) { |
409 | close(pNetwork->tlsDataParams.skt); | ||
410 | pNetwork->tlsDataParams.skt = -1; | ||
411 | } | ||
407 | 412 | ||
408 | SlNetSock_secAttribDelete(pNetwork->tlsDataParams.secAttrib); | 413 | if (pNetwork->tlsDataParams.secAttrib) { |
414 | SlNetSock_secAttribDelete(pNetwork->tlsDataParams.secAttrib); | ||
415 | pNetwork->tlsDataParams.secAttrib = NULL; | ||
416 | } | ||
409 | 417 | ||
410 | return (SUCCESS); | 418 | return (SUCCESS); |
411 | } | 419 | } |
diff --git a/samples/tirtos/subscribe_publish_sample/cc3220s/main_tirtos.c b/samples/tirtos/subscribe_publish_sample/cc3220s/main_tirtos.c index 40bba5f..1b47be7 100644 --- a/samples/tirtos/subscribe_publish_sample/cc3220s/main_tirtos.c +++ b/samples/tirtos/subscribe_publish_sample/cc3220s/main_tirtos.c | |||
@@ -130,6 +130,8 @@ void *awsThreadFxn(void *arg0) | |||
130 | uint16_t len = sizeof(ipAddr); | 130 | uint16_t len = sizeof(ipAddr); |
131 | uint16_t dhcpIsOn; | 131 | uint16_t dhcpIsOn; |
132 | 132 | ||
133 | Display_printf(display, 0, 0, "Starting the AWS IoT example application\n"); | ||
134 | |||
133 | /* Wait for an IP address, initialize the socket layer and get the time */ | 135 | /* Wait for an IP address, initialize the socket layer and get the time */ |
134 | Network_startup(); | 136 | Network_startup(); |
135 | 137 | ||
diff --git a/samples/tirtos/subscribe_publish_sample/cc3220sf/main_tirtos.c b/samples/tirtos/subscribe_publish_sample/cc3220sf/main_tirtos.c index 40bba5f..1b47be7 100644 --- a/samples/tirtos/subscribe_publish_sample/cc3220sf/main_tirtos.c +++ b/samples/tirtos/subscribe_publish_sample/cc3220sf/main_tirtos.c | |||
@@ -130,6 +130,8 @@ void *awsThreadFxn(void *arg0) | |||
130 | uint16_t len = sizeof(ipAddr); | 130 | uint16_t len = sizeof(ipAddr); |
131 | uint16_t dhcpIsOn; | 131 | uint16_t dhcpIsOn; |
132 | 132 | ||
133 | Display_printf(display, 0, 0, "Starting the AWS IoT example application\n"); | ||
134 | |||
133 | /* Wait for an IP address, initialize the socket layer and get the time */ | 135 | /* Wait for an IP address, initialize the socket layer and get the time */ |
134 | Network_startup(); | 136 | Network_startup(); |
135 | 137 | ||
diff --git a/samples/tirtos/subscribe_publish_sample/msp432e4/main_tirtos.c b/samples/tirtos/subscribe_publish_sample/msp432e4/main_tirtos.c index d28e03b..9af35ed 100644 --- a/samples/tirtos/subscribe_publish_sample/msp432e4/main_tirtos.c +++ b/samples/tirtos/subscribe_publish_sample/msp432e4/main_tirtos.c | |||
@@ -66,6 +66,8 @@ void *awsThreadFxn(void *arg0) | |||
66 | /* Open an NDK file descriptor session */ | 66 | /* Open an NDK file descriptor session */ |
67 | fdOpenSession(Task_self()); | 67 | fdOpenSession(Task_self()); |
68 | 68 | ||
69 | Display_printf(display, 0, 0, "Starting the AWS IoT example application\n"); | ||
70 | |||
69 | /* Wait for an IP address, initialize the socket layer and get the time */ | 71 | /* Wait for an IP address, initialize the socket layer and get the time */ |
70 | Network_startup(); | 72 | Network_startup(); |
71 | 73 | ||