osmo-bsc[master]: a_reset: cleanup + remove dead code

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon May 7 13:33:57 UTC 2018


Patch Set 1:

(5 comments)

please clarify...

https://gerrit.osmocom.org/#/c/8055/1/src/libbsc/a_reset.c
File src/libbsc/a_reset.c:

Line 158
good point, where is the inevitable osmo_fsm_inst_term() needed to end this FSM when the connection to an MSC ends?


Line 162
and now, who does ever free the reset_ctx? Seeing above that the fsm is allocated with 'reset' as its ctx, instead of the other way round, you need to separately talloc_free(reset) *somewhere*. And also an FSM term has to take care to NULL the reset->fsm pointer. (I've been through all this a couple of times working on the VLR back in the days.) The easiest solution is to keep 'reset' as the FSM's priv pointer, and also alloc the 'reset' as a talloc-child of the fi.


Line 33: #define RESET_RESEND_TIMER_NO 4/* See also 3GPP TS 48.008 Chapter 3.1.4.1.3.1 */
(missing space before comment)


Line 74: 		if (reset->conn_loss_counter >= BAD_CONNECTION_THRESOLD) {
I thought this wasn't used anymore. If it was, that would bring back the situation that caused a Reset after every third message?


Line 144: 	reset->fsm->priv = reset;
rather pass priv to osmo_fsm_inst_alloc()? :)


-- 
To view, visit https://gerrit.osmocom.org/8055
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I72095d52304c520e383755eee6c889bce492cbd4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list