Skip to content

Commit

Permalink
Update upload blob sample to use MQTT (#2482)
Browse files Browse the repository at this point in the history
* Update upload blob sample to use MQTT
  • Loading branch information
ericwolz committed May 5, 2023
1 parent b6c8b64 commit 66ef10a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions doc/setting_up_vcpkg.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The most recent [portfile.cmake](https://github.com/microsoft/vcpkg/blob/master/
```powershell
# Install azure-iot-sdk-c package with integration
.\vcpkg.exe integrate install
.\vcpkg.exe install azure-iot-sdk-c
.\vcpkg.exe install azure-iot-sdk-c:x64-windows
popd

# Open the Azure IoT C SDK telemetry sample solution for Visual Studio.
Expand All @@ -50,10 +50,10 @@ The most recent [portfile.cmake](https://github.com/microsoft/vcpkg/blob/master/

```powershell
# Install azure-iot-sdk-c package
.\vcpkg.exe install azure-iot-sdk-c
.\vcpkg.exe install azure-iot-sdk-c:x64-windows
# Export nuget package locally
.\vcpkg.exe export azure-iot-sdk-c --nuget
.\vcpkg.exe export azure-iot-sdk-c:x64-windows --nuget
popd
# Open the Azure IoT C SDK telemetry sample solution for Visual Studio.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ and removing calls to _DoWork will yield the same results. */

#include "azure_c_shared_utility/shared_util_options.h"
#include "iothub_message.h"
#include "iothubtransporthttp.h"
#include "iothubtransportmqtt.h"

#ifdef SET_TRUSTED_CERT_IN_SAMPLES
#include "certs.h"
Expand All @@ -45,7 +45,7 @@ int main(void)
(void)IoTHub_Init();
(void)printf("Starting the IoTHub client sample upload to blob...\r\n");

device_ll_handle = IoTHubDeviceClient_LL_CreateFromConnectionString(connectionString, HTTP_Protocol);
device_ll_handle = IoTHubDeviceClient_LL_CreateFromConnectionString(connectionString, MQTT_Protocol);
if (device_ll_handle == NULL)
{
(void)printf("Failure creating IotHub device. Hint: Check your connection string.\r\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ and removing calls to _DoWork will yield the same results. */
#include "iothub.h"
#include "iothub_device_client_ll.h"
#include "iothub_message.h"
#include "iothubtransporthttp.h"
#include "iothubtransportmqtt.h"

#ifdef SET_TRUSTED_CERT_IN_SAMPLES
#include "certs.h"
Expand Down Expand Up @@ -96,7 +96,7 @@ int main(void)
(void)IoTHub_Init();
(void)printf("Starting the IoTHub client sample upload to blob with multiple blocks...\r\n");

device_ll_handle = IoTHubDeviceClient_LL_CreateFromConnectionString(connectionString, HTTP_Protocol);
device_ll_handle = IoTHubDeviceClient_LL_CreateFromConnectionString(connectionString, MQTT_Protocol);
if (device_ll_handle == NULL)
{
(void)printf("Failure creating IotHub device. Hint: Check your connection string.\r\n");
Expand Down
4 changes: 2 additions & 2 deletions jenkins/raspberrypi/pyscripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
docker>=6.0.0
requests>=2.27.1
requests>=2.27.1,<2.29.0
colorama>=0.4.4
urllib3>=1.26.8
urllib3>=1.26.8,<2.0.0
six>=1.16.0

0 comments on commit 66ef10a

Please sign in to comment.