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/.
dexter gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/8055 a_reset: cleanup + remove dead code The function a_reset_free() is not used anywhere at the code. The reason for this is that a BSC instance is never cleared once it is started up. Also the timer number is not according to the spec. - Remove a_reset_free() - Fix timer number - Fix sourcecode formatting Change-Id: I72095d52304c520e383755eee6c889bce492cbd4 Related: OS#3102 --- M include/osmocom/bsc/a_reset.h M src/libbsc/a_reset.c 2 files changed, 1 insertion(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/55/8055/1 diff --git a/include/osmocom/bsc/a_reset.h b/include/osmocom/bsc/a_reset.h index c01a8b0..6e1c74f 100644 --- a/include/osmocom/bsc/a_reset.h +++ b/include/osmocom/bsc/a_reset.h @@ -20,8 +20,6 @@ #pragma once - - /* Reset context data (callbacks, state machine etc...) */ struct a_reset_ctx { @@ -43,9 +41,6 @@ /* Create and start state machine which handles the reset/reset-ack procedure */ struct a_reset_ctx *a_reset_alloc(const void *ctx, const char *name, void *cb, void *priv); - -/* Tear down state machine */ -void a_reset_free(struct a_reset_ctx *reset); /* Confirm that we sucessfully received a reset acknowlege message */ void a_reset_ack_confirm(struct a_reset_ctx *reset); diff --git a/src/libbsc/a_reset.c b/src/libbsc/a_reset.c index 1fccc5f..21c6d5f 100644 --- a/src/libbsc/a_reset.c +++ b/src/libbsc/a_reset.c @@ -30,7 +30,7 @@ #include <osmocom/bsc/osmo_bsc_sigtran.h> #define RESET_RESEND_INTERVAL 2 /* sec */ -#define RESET_RESEND_TIMER_NO 1234 /* FIXME: dig out the real timer number */ +#define RESET_RESEND_TIMER_NO 4/* See also 3GPP TS 48.008 Chapter 3.1.4.1.3.1 */ #define BAD_CONNECTION_THRESOLD 3 /* connection failures */ enum fsm_states { @@ -147,19 +147,6 @@ osmo_fsm_inst_state_chg(reset->fsm, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); return reset; -} - -/* Tear down state machine */ -void a_reset_free(struct a_reset_ctx *reset) -{ - OSMO_ASSERT(reset); - OSMO_ASSERT(reset->fsm); - - osmo_fsm_inst_free(reset->fsm); - reset->fsm = NULL; - - memset(reset, 0, sizeof(*reset)); - talloc_free(reset); } /* Confirm that we sucessfully received a reset acknowlege message */ -- To view, visit https://gerrit.osmocom.org/8055 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I72095d52304c520e383755eee6c889bce492cbd4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter <pmaier at sysmocom.de>