Microsoft Azure IoTHub client libraries

Dependents:   sht15_remote_monitoring RobotArmDemo iothub_client_sample_amqp f767zi_mqtt ... more

This library implements the Microsoft Azure IoTHub client library. The code is replicated from https://github.com/Azure/azure-iot-sdks

Revision:
46:6a69294b6119
Parent:
45:54c11b1b1407
Child:
57:4524910c6445
--- a/blob.c	Fri Jul 01 10:42:36 2016 -0700
+++ b/blob.c	Mon Jul 18 16:45:01 2016 -0700
@@ -160,6 +160,8 @@
                                 {
                                     /*Codes_SRS_BLOB_02_021: [ For every block of 4MB the following operations shall happen: ]*/
                                     unsigned int blockID = 0;
+                                    result = BLOB_ERROR;
+
                                     int isError = 0; /*used to cleanly exit the loop*/
                                     do
                                     {
@@ -176,7 +178,7 @@
                                         }
                                         else
                                         {
-                                            STRING_HANDLE blockIdString = Base64_Encode_Bytes(temp, 6);
+                                            STRING_HANDLE blockIdString = Base64_Encode_Bytes((const unsigned char*)temp, 6);
                                             if (blockIdString == NULL)
                                             {
                                                 /*Codes_SRS_BLOB_02_033: [ If any previous operation that doesn't have an explicit failure description fails then Blob_UploadFromSasUri shall fail and return BLOB_ERROR ]*/
@@ -310,8 +312,8 @@
                                                 else
                                                 {
                                                     /*Codes_SRS_BLOB_02_030: [ Blob_UploadFromSasUri shall call HTTPAPIEX_ExecuteRequest with a PUT operation, passing the new relativePath, httpStatus and httpResponse and the XML string as content. ]*/
-                                                    const unsigned char* s = (const unsigned char*)STRING_c_str(xml);
-                                                    BUFFER_HANDLE xmlAsBuffer = BUFFER_create(s, strlen(s));
+                                                    const char* s = STRING_c_str(xml);
+                                                    BUFFER_HANDLE xmlAsBuffer = BUFFER_create((const unsigned char*)s, strlen(s));
                                                     if (xmlAsBuffer == NULL)
                                                     {
                                                         /*Codes_SRS_BLOB_02_033: [ If any previous operation that doesn't have an explicit failure description fails then Blob_UploadFromSasUri shall fail and return BLOB_ERROR ]*/