Azure / azure-sdk-for-c

This repository is for active development of the Azure SDK for Embedded C. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-c.
MIT License
226 stars 120 forks source link

Bug in sdk/samples/iot/vxworks/azureClientSample.c #2094

Closed uklatt closed 2 years ago

uklatt commented 2 years ago

Hello,

I found a bug in sdk/samples/iot/vxworks/azureClientSample.c: https://github.com/Azure/azure-sdk-for-c/blob/d829ed8b6485cd1cf32bf0f0aeefdb730740acf1/sdk/samples/iot/vxworks/azureClientSample.c#L1085

When creating the MQTT client the third parameter of mosquitto_new(azureClientId, true, azureClient); is later passed to all MQTT callback functions. In this case it should be a pointer to the azure client.

In this example the third parameter is wrong! It should be mqqtClient = mosquitto_new(azureClientId, true, azureClient); instead of mqqtClient = mosquitto_new(azureClientId, true, &azureClient);

Tschau Uwe

danewalton commented 2 years ago

Hi @uklatt thanks for the find! Based on the docs here I believe you are right.

Would you like to submit a PR to contribute or would you like us to take care of this for you (don't want to steal your credit if you want to submit 😀 )

uklatt commented 2 years ago

I created a pull request.

Uwe