pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15406
Change subject: a_reset.c: Don't wait 2 seconds to send first BSSMAP RESET ...................................................................... a_reset.c: Don't wait 2 seconds to send first BSSMAP RESET Function fsm_reset_ack_timeout_cb() could be called directly from within a_reset_alloc(), but it's still desirable to deferr the BSSMAP RESET to be sent asynchronously by the timer upon next main loop step as soon as possible, so whole process is already configured properly. 1ms needs to be set instead of 0 (immediate asynchronous) because value 0 actually disables the timer. As a result, moving the state_chg() after the msc->a.reset_fsm assignment is not really needed, but still makes it more clear that the pointer will be set upon call of the timer callback. Related: OS#4188 Change-Id: I68d76a4050d4dec7d53b0031d67e0dd35ddd8764 --- M src/osmo-bsc/a_reset.c 1 file changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/06/15406/1 diff --git a/src/osmo-bsc/a_reset.c b/src/osmo-bsc/a_reset.c index fc59ff4..b75272f 100644 --- a/src/osmo-bsc/a_reset.c +++ b/src/osmo-bsc/a_reset.c @@ -161,11 +161,10 @@ reset_ctx->conn_loss_counter = 0; reset_fsm = osmo_fsm_inst_alloc(&fsm, msc, reset_ctx, LOGL_DEBUG, name); OSMO_ASSERT(reset_fsm); - - /* kick off reset-ack sending mechanism */ - osmo_fsm_inst_state_chg(reset_fsm, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); - msc->a.reset_fsm = reset_fsm; + + /* Immediatelly (1ms) kick off reset sending mechanism */ + osmo_fsm_inst_state_chg_ms(reset_fsm, ST_DISC, 1, RESET_RESEND_TIMER_NO); } /* Confirm that we sucessfully received a reset acknowlege message */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15406 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I68d76a4050d4dec7d53b0031d67e0dd35ddd8764 Gerrit-Change-Number: 15406 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pes...@sysmocom.de> Gerrit-MessageType: newchange