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: EthernetInterface NTPClient mbed-rtos mbed wolfSSL azure_c_shared_utility iothub_client azure_umqtt_c iothub_mqtt_transport serializer
Diff: simplesample_mqtt.c
- Revision:
- 30:7bb030702a93
- Parent:
- 26:3126b9d4187b
- Child:
- 34:4eea18741566
--- a/simplesample_mqtt.c Tue Jan 24 15:30:45 2017 -0800
+++ b/simplesample_mqtt.c Sat Jan 28 09:37:47 2017 -0800
@@ -107,7 +107,7 @@
if (IoTHubMessage_GetByteArray(message, &buffer, &size) != IOTHUB_MESSAGE_OK)
{
printf("unable to IoTHubMessage_GetByteArray\r\n");
- result = EXECUTE_COMMAND_ERROR;
+ result = IOTHUBMESSAGE_ABANDONED;
}
else
{
@@ -116,11 +116,11 @@
if (temp == NULL)
{
printf("failed to malloc\r\n");
- result = EXECUTE_COMMAND_ERROR;
+ result = IOTHUBMESSAGE_ABANDONED;
}
else
{
- memcpy(temp, buffer, size);
+ (void)memcpy(temp, buffer, size);
temp[size] = '\0';
EXECUTE_COMMAND_RESULT executeCommandResult = EXECUTE_COMMAND(userContextCallback, temp);
result =
