Microsoft Azure IoTHub client libraries

Dependents:   sht15_remote_monitoring RobotArmDemo iothub_client_sample_amqp f767zi_mqtt ... more

This library implements the Microsoft Azure IoTHub client library. The code is replicated from https://github.com/Azure/azure-iot-sdks

Revision:
57:4524910c6445
Parent:
56:fdda9c1244e4
Child:
58:15b0d29b2667
diff -r fdda9c1244e4 -r 4524910c6445 iothub_client.c
--- a/iothub_client.c	Fri Jan 13 18:40:33 2017 -0800
+++ b/iothub_client.c	Tue Jan 24 15:23:38 2017 -0800
@@ -2,13 +2,9 @@
 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
 
 #include <stdlib.h> 
-#ifdef _CRTDBG_MAP_ALLOC
-#include <crtdbg.h>
-#endif
 #include "azure_c_shared_utility/umock_c_prod.h"
 #include "azure_c_shared_utility/gballoc.h"
 
-#include <stdlib.h>
 #include <signal.h>
 #include <stddef.h>
 #include "azure_c_shared_utility/crt_abstractions.h"
@@ -334,7 +330,8 @@
     if (Lock(iotHubClientInstance->LockHandle) == LOCK_OK)
     {
         size_t callbacks_length = VECTOR_size(iotHubClientInstance->saved_user_callback_list);
-        for (size_t index = 0; index < callbacks_length; index++)
+        size_t index = 0;
+        for (index = 0; index < callbacks_length; index++)
         {
             USER_CALLBACK_INFO* queued_cb = (USER_CALLBACK_INFO*)VECTOR_element(iotHubClientInstance->saved_user_callback_list, index);
             if (queued_cb != NULL)
@@ -766,7 +763,8 @@
         }
 
         vector_size = VECTOR_size(iotHubClientInstance->saved_user_callback_list);
-        for (size_t index = 0; index < vector_size; index++)
+        size_t index = 0;
+        for (index = 0; index < vector_size; index++)
         {
             USER_CALLBACK_INFO* queue_cb_info = (USER_CALLBACK_INFO*)VECTOR_element(iotHubClientInstance->saved_user_callback_list, index);
             if (queue_cb_info != NULL)