Skip to content

Commit

Permalink
Merge branch 'bugfix/resolve_retry_policy_bug' into 'master'
Browse files Browse the repository at this point in the history
azure-iot-sdk-c: Update azure-iot-sdk-c to resolve retry control bug

See merge request esp-components/esp-azure!17
  • Loading branch information
mahavirj committed Mar 1, 2019
2 parents 6472bea + b12d4dc commit b549f61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,11 @@ static void SendConfirmationCallback(IOTHUB_CLIENT_CONFIRMATION_RESULT result, v
EVENT_INSTANCE* eventInstance = (EVENT_INSTANCE*)userContextCallback;
size_t id = eventInstance->messageTrackingId;

(void)printf("Confirmation[%d] received for message tracking id = %d with result = %s\r\n", callbackCounter, (int)id, ENUM_TO_STRING(IOTHUB_CLIENT_CONFIRMATION_RESULT, result));
/* Some device specific action code goes here... */
callbackCounter++;
if (result == IOTHUB_CLIENT_CONFIRMATION_OK) {
(void)printf("Confirmation[%d] received for message tracking id = %d with result = %s\r\n", callbackCounter, (int)id, ENUM_TO_STRING(IOTHUB_CLIENT_CONFIRMATION_RESULT, result));
/* Some device specific action code goes here... */
callbackCounter++;
}
IoTHubMessage_Destroy(eventInstance->messageHandle);
}

Expand Down Expand Up @@ -149,9 +151,6 @@ void iothub_client_sample_mqtt_run(void)
bool traceOn = true;
IoTHubClient_LL_SetOption(iotHubClientHandle, OPTION_LOG_TRACE, &traceOn);

IoTHubClient_LL_SetRetryPolicy(iotHubClientHandle,
IOTHUB_CLIENT_RETRY_INTERVAL,
0);
// Setting the Trusted Certificate. This is only necessary on system with without
// built in certificate stores.
#ifdef SET_TRUSTED_CERT_IN_SAMPLES
Expand Down

0 comments on commit b549f61

Please sign in to comment.