Azure IoT / iothub_http_transport

Dependents:   iothub_client_sample_http simplesample_http temp_sensor_anomaly

Files at this revision

API Documentation at this revision

Comitter:
AzureIoTClient
Date:
Mon May 22 10:34:45 2017 -0700
Parent:
30:655054f86a6e
Child:
32:4d4a226b072b
Commit message:
1.1.15

Changed in this revision

iothubtransporthttp.c Show annotated file Show diff for this revision Revisions of this file
--- a/iothubtransporthttp.c	Mon May 08 10:50:06 2017 -0700
+++ b/iothubtransporthttp.c	Mon May 22 10:34:45 2017 -0700
@@ -2090,8 +2090,12 @@
                                 }
                                 else
                                 {
+                                    const unsigned char* resp_content;
+                                    size_t resp_len;
                                     /*Codes_SRS_TRANSPORTMULTITHTTP_17_089: [_DoWork shall assemble an IOTHUBMESSAGE_HANDLE from the received HTTP content (using the responseContent buffer).] */
-                                    IOTHUB_MESSAGE_HANDLE receivedMessage = IoTHubMessage_CreateFromByteArray(BUFFER_u_char(responseContent), BUFFER_length(responseContent));
+                                    resp_content = BUFFER_u_char(responseContent);
+                                    resp_len = BUFFER_length(responseContent);
+                                    IOTHUB_MESSAGE_HANDLE receivedMessage = IoTHubMessage_CreateFromByteArray(resp_content, resp_len);
                                     if (receivedMessage == NULL)
                                     {
                                         /*Codes_SRS_TRANSPORTMULTITHTTP_17_092: [If assembling the message fails in any way, then _DoWork shall "abandon" the message.]*/