Code Monkey home page Code Monkey logo

Comments (7)

hwmaier avatar hwmaier commented on June 7, 2024 2

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 nx_azure_iot_json_writer_append_json_text() works as expected.

In the long run, maybe exposing _internal.total_bytes_written as an API call would be a solution, that way tests can be added and such a bug would have been picked up by a test case.

from netxduo.

ahsonkhan avatar ahsonkhan commented on June 7, 2024 1

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 total_bytes_written field in their scenarios
:)

from netxduo.

hwmaier avatar hwmaier commented on June 7, 2024 1

Fixed in latest 6.1.9 release,

from netxduo.

ahsonkhan avatar ahsonkhan commented on June 7, 2024

The current implementation is directly accessing internal fields, which should be avoided where possible. The issue is with the total_bytes_written, but that isn't exposed, and is currently meant for testing purposes only, within azure-sdk-for-c.
https://github.com/azure-rtos/netxduo/blob/d9d7fb05bd6a7a6b50a54c762e1730d8a8054cbb/addons/azure_iot/nx_azure_iot_json_writer.c#L97-L98

from netxduo.

hwmaier avatar hwmaier commented on June 7, 2024

@ahsonkhan Thank's for the quick resolution.
Now I hope the change is rolled into the next NetXDuo release soon.

from netxduo.

ahsonkhan avatar ahsonkhan commented on June 7, 2024

cc @yuxin-azrtos, @JeffreyRichter, @RickWinter

from netxduo.

TiejunMS avatar TiejunMS commented on June 7, 2024

cc @hihigupt

from netxduo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.