<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/15406">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">a_reset.c: Don't wait 2 seconds to send first BSSMAP RESET<br><br>Function fsm_reset_ack_timeout_cb() could be called directly from within<br>a_reset_alloc(), but it's still desirable to deferr the BSSMAP RESET to<br>be sent asynchronously by the timer upon next main loop step as soon as<br>possible, so whole process is already configured properly.<br><br>1ms needs to be set instead of 0 (immediate asynchronous) because value<br>0 actually disables the timer.<br><br>As a result, moving the state_chg() after the msc->a.reset_fsm<br>assignment is not really needed, but still makes it more clear that the<br>pointer will be set upon call of the timer callback.<br><br>Related: OS#4188<br>Change-Id: I68d76a4050d4dec7d53b0031d67e0dd35ddd8764<br>---<br>M src/osmo-bsc/a_reset.c<br>1 file changed, 3 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/06/15406/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/a_reset.c b/src/osmo-bsc/a_reset.c</span><br><span>index fc59ff4..b75272f 100644</span><br><span>--- a/src/osmo-bsc/a_reset.c</span><br><span>+++ b/src/osmo-bsc/a_reset.c</span><br><span>@@ -161,11 +161,10 @@</span><br><span>         reset_ctx->conn_loss_counter = 0;</span><br><span>         reset_fsm = osmo_fsm_inst_alloc(&fsm, msc, reset_ctx, LOGL_DEBUG, name);</span><br><span>         OSMO_ASSERT(reset_fsm);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- /* kick off reset-ack sending mechanism */</span><br><span style="color: hsl(0, 100%, 40%);">-      osmo_fsm_inst_state_chg(reset_fsm, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>   msc->a.reset_fsm = reset_fsm;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    /* Immediatelly (1ms) kick off reset sending mechanism */</span><br><span style="color: hsl(120, 100%, 40%);">+     osmo_fsm_inst_state_chg_ms(reset_fsm, ST_DISC, 1, RESET_RESEND_TIMER_NO);</span><br><span> }</span><br><span> </span><br><span> /* Confirm that we sucessfully received a reset acknowlege message */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/15406">change 15406</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bsc/+/15406"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I68d76a4050d4dec7d53b0031d67e0dd35ddd8764 </div>
<div style="display:none"> Gerrit-Change-Number: 15406 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>