Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/28862 ) Change subject: trxcon: rework trxcon_inst cleanup logic, add trxcon_fsm_pre_term_cb() ...................................................................... Patch Set 1: (1 comment) File src/host/trxcon/src/trxcon.c: https://gerrit.osmocom.org/c/osmocom-bb/+/28862/comment/f205ae69_821d626f PS1, Line 270: /* Reparent trxcon_inst from ctx to trxcon->fi */
Here again, reparenting makes everything more convoluted and difficult to follow imho, and must be u […] We're dealing with a chicken-egg problem here. trxcon_inst is allocated first because a) it holds a pointer to an FSM instance, so we can do trxcon->fi = osmo_fsm_inst_alloc(...) directly; b) we pass a pointer to trxcon_inst when calling osmo_fsm_inst_alloc(), so it becomes fi->priv. To me using talloc_reparent() does not really look that critical.
-- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28862 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I5eb8ef6f62b1dc949dc60eaa558f123b3b93819c Gerrit-Change-Number: 28862 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin@sysmocom.de> Gerrit-Attention: pespin <pespin@sysmocom.de> Gerrit-Comment-Date: Mon, 01 Aug 2022 12:46:11 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin@sysmocom.de> Gerrit-MessageType: comment