IoTHub raw messaging client sample using MQTT
Dependencies: EthernetInterface NTPClient mbed-rtos mbed wolfSSL azure_c_shared_utility iothub_client azure_umqtt_c iothub_mqtt_transport
Diff: iothub_client_sample_mqtt.c
- Revision:
- 27:7c908b91210a
- Parent:
- 22:27faaa37d70f
- Child:
- 30:0a147a179e7e
--- a/iothub_client_sample_mqtt.c Fri Jan 13 18:42:05 2017 -0800 +++ b/iothub_client_sample_mqtt.c Tue Jan 24 15:29:17 2017 -0800 @@ -65,7 +65,8 @@ { if (propertyCount > 0) { - for (size_t index = 0; index < propertyCount; index++) + size_t index = 0; + for (index = 0; index < propertyCount; index++) { (void)printf("\tKey: %s Value: %s\r\n", keys[index], values[index]); } @@ -171,7 +172,8 @@ } while (g_continueRunning); (void)printf("iothub_client_sample_mqtt has gotten quit message, call DoWork %d more time to complete final sending...\r\n", DOWORK_LOOP_NUM); - for (size_t index = 0; index < DOWORK_LOOP_NUM; index++) + size_t index = 0; + for (index = 0; index < DOWORK_LOOP_NUM; index++) { IoTHubClient_LL_DoWork(iotHubClientHandle); ThreadAPI_Sleep(1);