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.
Dependents: iothub_client_sample_http simplesample_http temp_sensor_anomaly
Revision 8:1b71bf027eb5, committed 2015-12-17
- Comitter:
- AzureIoTClient
- Date:
- Thu Dec 17 18:23:34 2015 -0800
- Parent:
- 7:48f0f78cd3ef
- Child:
- 9:0b2cab6cfc60
- Commit message:
- v1.0.0-preview.4
Changed in this revision
| iothubtransporthttp.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/iothubtransporthttp.c Mon Nov 02 19:21:17 2015 -0800
+++ b/iothubtransporthttp.c Thu Dec 17 18:23:34 2015 -0800
@@ -817,9 +817,9 @@
{
bool isFirst = true;
PDLIST_ENTRY actual;
+ bool keepGoing = true; /*keepGoing gets sometimes to false from within the loop*/
/*either all the items enter the list or only some*/
result = MAKE_PAYLOAD_OK; /*optimistically initializing it*/
- bool keepGoing = true; /*keepGoing gets sometimes to false from within the loop*/
while (keepGoing && ((actual = handleData->waitingToSend->Flink) != handleData->waitingToSend))
{
size_t messageSize;
@@ -1105,6 +1105,9 @@
{
size_t i;
bool goOn = true;
+ const char* msgId;
+ const char* corrId;
+
for (i = 0; (i < count) && goOn; i++)
{
/*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_123: [Every property name shall add to the message size the length of the property name + the length of the property value + 16 bytes.] */
@@ -1149,7 +1152,7 @@
}
// Add the Message Id and the Correlation Id
- const char* msgId = IoTHubMessage_GetMessageId(message->messageHandle);
+ msgId = IoTHubMessage_GetMessageId(message->messageHandle);
if (goOn && msgId != NULL)
{
if (HTTPHeaders_ReplaceHeaderNameValuePair(clonedEventHTTPrequestHeaders, IOTHUB_MESSAGE_ID, msgId) != HTTP_HEADERS_OK)
@@ -1159,7 +1162,7 @@
}
}
- const char* corrId = IoTHubMessage_GetCorrelationId(message->messageHandle);
+ corrId = IoTHubMessage_GetCorrelationId(message->messageHandle);
if (goOn && corrId != NULL)
{
if (HTTPHeaders_ReplaceHeaderNameValuePair(clonedEventHTTPrequestHeaders, IOTHUB_CORRELATION_ID, corrId) != HTTP_HEADERS_OK)