Attention is currently required from: fixeria, neels.
4 comments:
Commit Message:
Swap the talloc tree parentship to have the fi be a child of the object,
which simplifies tear down triggered by FSM cleanup.
From the hierarchical point of view, I find it logical the way it is: the FSM instance's private dat […]
It's logical, but it has drawbacks, like not being able to quickly figuring out where the object is freed and hence it's entire lifecycle.
Patch Set #2, Line 14: Apparently the object is not being freed anywhere
It's being free()d automatically by talloc, since it's allocated as a child of the fi: […]
I know it's freed by talloc automatically. Now, can you tell me where is the fsm instance being terminated/freed in the codebase? It's never freed anywhere. That's what I meant.
And yes, the fact that it's freed automatically by terminating/freeing the FSM doesn't really help precisely figuring out where this object is freed, because there's no specific API to grep for in the code.
File include/osmocom/msc/ran_peer.h:
Patch Set #2, Line 109: ran_peer_discard_all_conns
How is this related to this patch? Why exposing this API?
It's called by ran_peer_free(), so I need it declared beforehand.
It was already not set as static before, so I'm not really changing that here.
I can make it static and add a forward declaration in the .c file if you want.
File src/libmsc/ran_peer.c:
Patch Set #2, Line 79: ran_peer_free
You're adding this new API, but it's not being called anywhere. […]
Yeah well, these objects are not actually being freed anywhere in code (yet?). Still, it's good to have a clear lifecycle with all the logic so no bugs are introduced whenever somebody needs freeing them at some point later.
To view, visit change 40632. To unsubscribe, or for help writing mail filters, visit settings.