Changeset 399 for azure_iot_hub/trunk/app_iothub_client/src/client.c
- Timestamp:
- Jun 5, 2019, 2:23:55 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
azure_iot_hub/trunk/app_iothub_client/src/client.c
r396 r399 218 218 printf("failure to set option \"MinimumPollingTime\"\r\n"); 219 219 } 220 221 bool traceOn = 1; 222 if (IoTHubClient_LL_SetOption(iotHubClientHandle, OPTION_LOG_TRACE, &traceOn) != IOTHUB_CLIENT_OK) 223 { 224 printf("failure to set option \"log trace on\"\r\n"); 225 } 220 226 #endif 221 227 #ifdef SET_TRUSTED_CERT_IN_SAMPLES … … 241 247 do 242 248 { 243 //(void)printf("iterator: [%d], callbackCounter: [%d]. \r\n", iterator, callbackCounter); 244 245 if (iterator < MESSAGE_COUNT && (iterator <= callbackCounter)) 249 if ((iterator < MESSAGE_COUNT) && (iterator <= callbackCounter)) 246 250 { 247 251 temperature = minTemperature + (rand() % 10); … … 265 269 } 266 270 267 (void)IoTHubMessage_SetContentTypeSystemProperty(messages[iterator].messageHandle, "application/json"); 268 (void)IoTHubMessage_SetContentEncodingSystemProperty(messages[iterator].messageHandle, "utf-8"); 271 if (proto == 0) { 272 (void)IoTHubMessage_SetContentTypeSystemProperty(messages[iterator].messageHandle, "application/json"); 273 (void)IoTHubMessage_SetContentEncodingSystemProperty(messages[iterator].messageHandle, "utf-8"); 274 } 269 275 270 276 if (IoTHubClient_LL_SendEventAsync(iotHubClientHandle, messages[iterator].messageHandle, SendConfirmationCallback, &messages[iterator]) != IOTHUB_CLIENT_OK) … … 277 283 } 278 284 } 285 iterator++; 279 286 } 280 287 281 288 IoTHubClient_LL_DoWork(iotHubClientHandle); 282 289 ThreadAPI_Sleep(1); 283 284 iterator++;285 290 286 291 if (callbackCounter >= MESSAGE_COUNT)
Note:
See TracChangeset
for help on using the changeset viewer.