Microsoft Azure IoTHub client AMQP transport

Dependents:   sht15_remote_monitoring RobotArmDemo iothub_client_sample_amqp iothub_client_sample_amqp ... more

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

Revision:
46:c688c75b63b9
Parent:
45:c09fac270e60
Child:
50:f3a92c6c6534
--- a/iothubtransport_amqp_telemetry_messenger.c	Fri Nov 17 13:56:41 2017 -0800
+++ b/iothubtransport_amqp_telemetry_messenger.c	Fri Dec 15 14:08:19 2017 -0800
@@ -1104,8 +1104,8 @@
     }
     else if (message_set_message_format(send_pending_events_state->message_batch_container, AMQP_BATCHING_FORMAT_CODE) != 0)
     {
-        LogError("Failed setting the message format to batching format");
-        result = __FAILURE__;
+         LogError("Failed setting the message format to batching format");
+         result = __FAILURE__;
     }
     else if ((send_pending_events_state->task = create_task(instance)) == NULL)
     {
@@ -1214,7 +1214,7 @@
             break;
         }
         // Codes_SRS_IOTHUBTRANSPORT_AMQP_MESSENGER_31_200: [Retrieve an AMQP encoded representation of this message for later appending to main batched message.  On error, invoke callback but continue send loop; this is NOT a fatal error.]
-        else if (message_create_uamqp_encoding_from_iothub_message(caller_info->message->messageHandle, &body_binary_data) != RESULT_OK)
+        else if (message_create_uamqp_encoding_from_iothub_message(send_pending_events_state.message_batch_container, caller_info->message->messageHandle, &body_binary_data) != RESULT_OK)
         {
             // Codes_SRS_IOTHUBTRANSPORT_AMQP_MESSENGER_31_201: [If message_create_uamqp_encoding_from_iothub_message fails, invoke callback with TELEMETRY_MESSENGER_EVENT_SEND_COMPLETE_RESULT_ERROR_CANNOT_PARSE]
             LogError("message_create_uamqp_encoding_from_iothub_message() failed.  Will continue to try to process messages, result");