diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-09-04 12:57:44 +0200 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2019-09-07 23:40:33 +0000 |
commit | c9cd6bb78601780b49ea4c4c3db118aa0f5727e3 (patch) | |
tree | 5ae05ff3ecfe8350b7d8268f2760b9619efc3ee5 | |
parent | bbd0bfff174e54eea66a611fb138eea8243494bf (diff) |
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
-rw-r--r-- | src/osmo-bsc/a_reset.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/osmo-bsc/a_reset.c b/src/osmo-bsc/a_reset.c index fc59ff4da..b75272fd1 100644 --- a/src/osmo-bsc/a_reset.c +++ b/src/osmo-bsc/a_reset.c @@ -161,11 +161,10 @@ void a_reset_alloc(struct bsc_msc_data *msc, const char *name, void *cb) 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 */ |