Attention is currently required from: fixeria.
1 comment:
File src/host/trxcon/src/trxcon.c:
Patch Set #1, Line 270: /* Reparent trxcon_inst from ctx to trxcon->fi */
We're dealing with a chicken-egg problem here. […]
I think it's much more clearer doing this instead of mangling with talloc contexts:
fi = osmo_fsm_inst_alloc( priv = NULL)
fi->priv = trxcon = talloc_zero(fi, struct trxcon_inst);
trxcon->fi = fi;
BTW FYI, I've seen usually this solved/workarounded by using talloc_steal during the cleanup callback when freeing the fi->priv.
Let's see what other think about this topic. I'd really avoid reparenting and this kind of stuff as much as possible, otherwise there's a high potential of shooting at your/someone else's foot later on when updating the code.
To view, visit change 28862. To unsubscribe, or for help writing mail filters, visit settings.