<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/19503">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmo-bts-trx/scheduler: fix CLCK.ind handling during ramping down<br><br>On receipt of either SIGTERM or SIGINT the shutdown FSM initiates<br>ramping down of the transmit power on Downlink.  I noticed that<br>for some reason osmo-bts-trx stops sending Downlink bursts during<br>the process of ramping down.<br><br>I also noticed the following imporatant message:<br><br>  DL1C NOTICE scheduler_trx.c:287 No more clock from transceiver<br><br>despite the transceiver is still powered on and keeps sending<br>the clock indications over the TRXC interface.<br><br>As it turned out, the problem is that on receipt of either SIGTERM<br>or SIGINT, we also raise the global 'quit' flag, so in the scheduler<br>trx_sched_clock() stealthy stops handling the clock indications.<br><br>Let's ensure that clock indications are handled regardless of the<br>state of 'quit' flag, so the ramping down would work as expected.<br><br>Change-Id: Ia71133d6f0b900e5e103595c83303a7cc5c06edf<br>---<br>M src/common/main.c<br>M src/osmo-bts-trx/scheduler_trx.c<br>2 files changed, 1 insertion(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/03/19503/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/common/main.c b/src/common/main.c</span><br><span>index 6d8088c..f4dc505 100644</span><br><span>--- a/src/common/main.c</span><br><span>+++ b/src/common/main.c</span><br><span>@@ -56,7 +56,7 @@</span><br><span> #include <osmocom/ctrl/control_vty.h></span><br><span> #include <osmo-bts/oml.h></span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-int quit = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+static int quit = 0;</span><br><span> static const char *config_file = "osmo-bts.cfg";</span><br><span> static int daemonize = 0;</span><br><span> static int rt_prio = -1;</span><br><span>diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c</span><br><span>index fcd1eee..85f0e92 100644</span><br><span>--- a/src/osmo-bts-trx/scheduler_trx.c</span><br><span>+++ b/src/osmo-bts-trx/scheduler_trx.c</span><br><span>@@ -134,8 +134,6 @@</span><br><span>        ts->tv_nsec = ts->tv_nsec % 1000000000;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-extern int quit;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> /*! this is the timerfd-callback firing for every FN to be processed */</span><br><span> static int trx_fn_timer_cb(struct osmo_fd *ofd, unsigned int what)</span><br><span> {</span><br><span>@@ -274,9 +272,6 @@</span><br><span>   unsigned int fn_caught_up = 0;</span><br><span>       const struct timespec interval = { .tv_sec = 0, .tv_nsec = GSM_TDMA_FN_DURATION_nS };</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-       if (quit)</span><br><span style="color: hsl(0, 100%, 40%);">-               return 0;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>    /* reset lost counter */</span><br><span>     tcs->fn_without_clock_ind = 0;</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/19503">change 19503</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-bts/+/19503"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia71133d6f0b900e5e103595c83303a7cc5c06edf </div>
<div style="display:none"> Gerrit-Change-Number: 19503 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>