fork from simple sample of mqtt
Dependencies: azure_c_shared_utility azure_umqtt_c iothub_client iothub_mqtt_transport serializer wolfSSL
Fork of simplesample_mqtt by
Diff: simplesample_mqtt.c
- Revision:
- 30:7bb030702a93
- Parent:
- 26:3126b9d4187b
diff -r 5afbc4d8f62f -r 7bb030702a93 simplesample_mqtt.c --- 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 =