Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: iothub_client EthernetInterface iothub_http_transport mbed-rtos mbed wolfSSL azure_c_shared_utility NTPClient
Diff: iothub_client_sample_http.c
- Revision:
- 47:bc18bf0e4a6a
- Parent:
- 46:91bd03862871
- Child:
- 48:07c7ca66634a
diff -r 91bd03862871 -r bc18bf0e4a6a iothub_client_sample_http.c
--- a/iothub_client_sample_http.c Fri Jul 01 10:43:55 2016 -0700
+++ b/iothub_client_sample_http.c Mon Jul 18 16:45:56 2016 -0700
@@ -40,7 +40,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)
@@ -94,7 +94,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);
@@ -179,7 +179,7 @@
messages[iterator].messageTrackingId = iterator;
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");
