Azure IoT / Mbed 2 deprecated iothub_client_sample_amqp

Dependencies:   iothub_client EthernetInterface NTPClient iothub_amqp_transport azure_c_shared_utility mbed-rtos mbed azure_uamqp_c wolfSSL

Files at this revision

API Documentation at this revision

Comitter:
AzureIoTClient
Date:
Mon Jul 18 16:45:37 2016 -0700
Parent:
47:d87920c7f211
Child:
49:c64cd74af7d0
Commit message:
1.0.11

Changed in this revision

iothub_amqp_transport.lib Show annotated file Show diff for this revision Revisions of this file
iothub_client.lib Show annotated file Show diff for this revision Revisions of this file
iothub_client_sample_amqp.c Show annotated file Show diff for this revision Revisions of this file
--- a/iothub_amqp_transport.lib	Fri Jul 01 10:43:40 2016 -0700
+++ b/iothub_amqp_transport.lib	Mon Jul 18 16:45:37 2016 -0700
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/AzureIoTClient/code/iothub_amqp_transport/#239d162e3607
\ No newline at end of file
+https://developer.mbed.org/users/AzureIoTClient/code/iothub_amqp_transport/#ea016664011a
\ No newline at end of file
--- a/iothub_client.lib	Fri Jul 01 10:43:40 2016 -0700
+++ b/iothub_client.lib	Mon Jul 18 16:45:37 2016 -0700
@@ -1,1 +1,1 @@
-http://mbed.org/users/AzureIoTClient/code/iothub_client/#54c11b1b1407
\ No newline at end of file
+http://mbed.org/users/AzureIoTClient/code/iothub_client/#6a69294b6119
\ No newline at end of file
--- a/iothub_client_sample_amqp.c	Fri Jul 01 10:43:40 2016 -0700
+++ b/iothub_client_sample_amqp.c	Mon Jul 18 16:45:37 2016 -0700
@@ -31,7 +31,7 @@
 typedef struct EVENT_INSTANCE_TAG
 {
     IOTHUB_MESSAGE_HANDLE messageHandle;
-    int messageTrackingId;  // For tracking the messages within the user callback.
+    size_t messageTrackingId;  // For tracking the messages within the user callback.
 } EVENT_INSTANCE;
 
 static IOTHUBMESSAGE_DISPOSITION_RESULT ReceiveMessageCallback(IOTHUB_MESSAGE_HANDLE message, void* userContextCallback)
@@ -69,7 +69,7 @@
     }
     else if (contentType == IOTHUBMESSAGE_STRING)
     {
-        if ((buffer = IoTHubMessage_GetString(message)) != NULL && (size = strlen(buffer)) > 0)
+        if ((buffer = (const unsigned char*)IoTHubMessage_GetString(message)) != NULL && (size = strlen((const char*)buffer)) > 0)
         {
             (void)printf("Received Message [%d] (message-id: %s, correlation-id: %s) with STRING Data: <<<%.*s>>> & Size=%d\r\n", *counter, messageId, correlationId, (int)size, buffer, (int)size);
 
@@ -121,7 +121,7 @@
 static void SendConfirmationCallback(IOTHUB_CLIENT_CONFIRMATION_RESULT result, void* userContextCallback)
 {
     EVENT_INSTANCE* eventInstance = (EVENT_INSTANCE*)userContextCallback;
-    (void)printf("Confirmation[%d] received for message tracking id = %d with result = %s\r\n", callbackCounter, eventInstance->messageTrackingId, ENUM_TO_STRING(IOTHUB_CLIENT_CONFIRMATION_RESULT, result));
+    (void)printf("Confirmation[%d] received for message tracking id = %zu with result = %s\r\n", callbackCounter, eventInstance->messageTrackingId, ENUM_TO_STRING(IOTHUB_CLIENT_CONFIRMATION_RESULT, result));
     /* Some device specific action code goes here... */
     callbackCounter++;
     IoTHubMessage_Destroy(eventInstance->messageHandle);
@@ -190,7 +190,7 @@
                             messages[iterator].messageTrackingId = iterator;
 
                             MAP_HANDLE propMap = IoTHubMessage_Properties(messages[iterator].messageHandle);
-                            sprintf_s(propText, sizeof(propText), "PropMsg_%d", iterator);
+                            (void)sprintf_s(propText, sizeof(propText), "PropMsg_%zu", iterator);
                             if (Map_AddOrUpdate(propMap, "PropName", propText) != MAP_OK)
                             {
                                 (void)printf("ERROR: Map_AddOrUpdate Failed!\r\n");