GithubHelp home page GithubHelp logo

Comments (13)

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on August 23, 2024

In GitLab by @vornkat-iis on Jul 2, 2023, 21:06

@bmi How do you run "japi_pushsrv_destroy at runtime"? japi_start_server is a blocking call, so usually push services cannot be modified while the server is running. Do you modify the context and then start it again? Or are you running it asynchron?

From inside japi_pushsrv_destroy I cannot access ctx which I would need to modify. What would you (as user and as SW architect) propose?

  1. Document, that users need to clean up the linked list in ctx->push_services themselves if removing a push service. No modification to code.
  2. Change the API to add ctx to the parameters of japi_pushsrv_destroy (could be a breaking change for some users) and clean up the list there
  3. Add a wrapping function which handles the linked list and calls japi_pushsrv_destroy. Find a code proposal for that in 824dd8f

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on August 23, 2024

In GitLab by @vornkat-iis on Jul 2, 2023, 21:36

added 1 commit

  • 824dd8f - Add japi_pushsrv_deregister and tests

Compare with previous version

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on August 23, 2024

In GitLab by @vornkat-iis on Jul 2, 2023, 21:57

requested review from @Michael-M-Baron

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on August 23, 2024

In GitLab by @bmi on Jul 3, 2023, 08:46

i dont use it because it is not destroying the pointers.
At the moment i have my own destroy function to destroy the pointers correct.
I modify the context via a request function and my pointers are in a global context.
I am not starting or Stoping anything. And i also not run asynchron.

to your points:
1: never do this your library is creating the pointer you must be sure to clean up everything.

2: yes this is the the only way you can handle it(at my point of view at the moment). And i think this is not a breaking change for somebody because if you not do it the code is broken and it will not run further so it is important to clean the list.
(and nobody has report the problem bevor me, so i think nobody is using this at runtime)

  1. I do not understand what you want to achieve

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on August 23, 2024

In GitLab by @vornkat-iis on Jul 3, 2023, 13:09

added 1 commit

  • 295d04a - japi_pushsrv_destroy: remove from linked list

Compare with previous version

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on August 23, 2024

In GitLab by @vornkat-iis on Jul 3, 2023, 13:15

Assumption: It is save to change the signature of the function. If another user would access this function, they would have found the error sooner.

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on August 23, 2024

In GitLab by @vornkat-iis on Jul 4, 2023, 13:56

added 1 commit

  • 95ec765 - Catch double free in japi_pushsrv_destroy

Compare with previous version

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on August 23, 2024

In GitLab by @vornkat-iis on Jul 4, 2023, 14:01

marked this merge request as ready

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on August 23, 2024

In GitLab by @vornkat-iis on Jul 4, 2023, 17:42

changed target branch from master to dev

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on August 23, 2024

In GitLab by @Michael-M-Baron on Jul 5, 2023, 10:52

added 8 commits

  • 95ec765...5b83a42 - 7 commits from branch dev
  • c1aefa9 - Merge branch 'dev' of git01.iis.fhg.de:ks-ip-lib/software/libjapi into...

Compare with previous version

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on August 23, 2024

In GitLab by @Michael-M-Baron on Jul 5, 2023, 10:57

I encountered this problem as well while developing the dynamic creating and removing of push services. See #47 for details.

The new approach with updating the ctx push service list in japi_pushsrv_destroy() right away looks good!

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on August 23, 2024

In GitLab by @Michael-M-Baron on Jul 5, 2023, 11:06

approved this merge request

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on August 23, 2024

In GitLab by @Michael-M-Baron on Jul 5, 2023, 11:06

mentioned in commit 0687def

from libjapi.

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.