-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nx_azure_iot_json_writer_append_json_text does not take into account required buffer space for commas #47
Comments
The current implementation is directly accessing internal fields, which should be avoided where possible. The issue is with the |
Well I am only an end user stumbling over a bug which I reported and provided a fix with my PR. Without a bug fix I cannot proceed with my application. As an outsider I leave the debate about whether internal data structures should be accessed or not within Microsoft products to the relevant dev teams. However I would prefer a quick pragmatic solution, and my PR does provide this. It fixes the correctness of the internal data structure and then In the long run, maybe exposing |
Absolutely! Thank you for flagging the issue and providing the fix. I totally agree that it was the right approach, especially to address customer facing issues like you pointed out. My note above was mainly for contributors to this repo to evaluate current usage of internal-only state. I hadn't realized folks were using and benefiting from the |
@ahsonkhan Thank's for the quick resolution. |
cc @hihigupt |
Fixed in latest 6.1.9 release, |
When
nx_azure_iot_json_writer_append_json_text()
is used to write elements of an array, the resulting JSON packet is incomplete. The NX_PACKET's byte count is short of exactly the amount of commas inserted internally byaz_json_writer_append_json_text()
.This is an issue with the underlaying azure-sdk-for-c and a PR has been submitted here: Azure/azure-sdk-for-c#1905
However as this bug also affects the JSON writing functionality of NetX Duo I believe this should be reported here as well, hoping that a fix can be coordinated between the two Microsoft dev teams and be available with the next NetXDuo release.
The text was updated successfully, but these errors were encountered: