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:
56:8704100b3b54
Parent:
54:830550fef7ea
--- a/iothubtransportamqp_methods.c	Thu Jul 12 18:08:04 2018 -0700
+++ b/iothubtransportamqp_methods.c	Tue Sep 11 11:11:47 2018 -0700
@@ -115,7 +115,7 @@
         else
         {
             memset(result, 0, sizeof(IOTHUBTRANSPORT_AMQP_METHODS));
-            
+
             /* Codes_SRS_IOTHUBTRANSPORT_AMQP_METHODS_01_115: [ `iothubtransportamqp_methods_create` shall save the device id for later use by using `mallocAndStrcpy_s`. ]*/
             if (mallocAndStrcpy_s(&result->device_id, device_id) != 0)
             {
@@ -248,8 +248,9 @@
     }
 }
 
-static void on_message_send_complete(void* context, MESSAGE_SEND_RESULT send_result)
+static void on_message_send_complete(void* context, MESSAGE_SEND_RESULT send_result, AMQP_VALUE delivery_state)
 {
+    (void)delivery_state;
     /* Codes_SRS_IOTHUBTRANSPORT_AMQP_METHODS_01_084: [ Otherwise no action shall be taken. ]*/
     if (send_result == MESSAGE_SEND_ERROR)
     {
@@ -493,7 +494,7 @@
 {
     if (iothubtransport_amqp_methods_handle->module_id != NULL)
     {
-        return STRING_construct_sprintf("%s/%s", iothubtransport_amqp_methods_handle->device_id, iothubtransport_amqp_methods_handle->module_id);  
+        return STRING_construct_sprintf("%s/%s", iothubtransport_amqp_methods_handle->device_id, iothubtransport_amqp_methods_handle->module_id);
     }
     else
     {
@@ -675,7 +676,7 @@
         (on_method_request_received == NULL) ||
         (on_methods_unsubscribed == NULL))
     {
-        LogError("Invalid arguments: iothubtransport_amqp_methods_handle=%p, session_handle=%p, on_methods_error=%p, on_method_request_received=%p, on_methods_unsubscribed=%p", 
+        LogError("Invalid arguments: iothubtransport_amqp_methods_handle=%p, session_handle=%p, on_methods_error=%p, on_method_request_received=%p, on_methods_unsubscribed=%p",
             iothubtransport_amqp_methods_handle, session_handle, on_methods_error, on_method_request_received, on_methods_unsubscribed);
         result = __FAILURE__;
     }
@@ -726,7 +727,7 @@
                 else
                 {
                     /* Codes_SRS_IOTHUBTRANSPORT_AMQP_METHODS_01_012: [ - `name` shall be in the format `methods_requests_link-{device_id}` (+ `/{module-id}` if module id is present). ]*/
-                    STRING_HANDLE requests_link_name = create_requests_link_name(iothubtransport_amqp_methods_handle); 
+                    STRING_HANDLE requests_link_name = create_requests_link_name(iothubtransport_amqp_methods_handle);
                     if (requests_link_name == NULL)
                     {
                         /* Codes_SRS_IOTHUBTRANSPORT_AMQP_METHODS_01_153: [ If constructing the requests link name fails, `iothubtransportamqp_methods_subscribe` shall fail and return a non-zero value. ]*/