<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/20245">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Free all MS TBFs when receiving GPRS Suspension Request<br><br>Otherwise, if there's DL data queued in the PCU for TBFs related to the<br>MS sending the GPRS Suspension Request, then the PCU will continue<br>sending DL data and nobody will<br><br>Otherwise the TBFs are kept, and hence PCU will continue reserving resources and<br>DL data queued will still be sent over the air, despite the MS not<br>listening anymore on the PDCH.<br><br>Change-Id: I4ae1c3706b2ed6e4d271cd16f7cd7f8937b84836<br>---<br>M src/pcu_l1_if.cpp<br>1 file changed, 17 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/45/20245/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp</span><br><span>index 21eacfd..535fb70 100644</span><br><span>--- a/src/pcu_l1_if.cpp</span><br><span>+++ b/src/pcu_l1_if.cpp</span><br><span>@@ -49,6 +49,8 @@</span><br><span> #include <osmocom/pcu/pcuif_proto.h></span><br><span> #include <bts.h></span><br><span> #include <pdch.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <tbf_ul.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <tbf_dl.h></span><br><span> </span><br><span> // FIXME: move this, when changed from c++ to c.</span><br><span> extern "C" {</span><br><span>@@ -730,7 +732,11 @@</span><br><span> </span><br><span> static int pcu_rx_susp_req(struct gsm_pcu_if_susp_req *susp_req)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ BTS *bts = BTS::main_bts();</span><br><span>  struct bssgp_bvc_ctx *bctx = gprs_bssgp_pcu_current_bctx();</span><br><span style="color: hsl(120, 100%, 40%);">+   GprsMs *ms;</span><br><span style="color: hsl(120, 100%, 40%);">+   struct gprs_rlcmac_dl_tbf *dl_tbf;</span><br><span style="color: hsl(120, 100%, 40%);">+    struct gprs_rlcmac_ul_tbf *ul_tbf;</span><br><span>   struct gprs_ra_id ra_id;</span><br><span> </span><br><span>         gsm48_parse_ra(&ra_id, susp_req->ra_id);</span><br><span>@@ -738,6 +744,17 @@</span><br><span>       LOGP(DL1IF, LOGL_INFO, "GPRS Suspend request received: TLLI=0x%08x RAI=%s\n",</span><br><span>              susp_req->tlli, osmo_rai_name(&ra_id));</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+    if ((ms = bts->ms_store().get_ms(susp_req->tlli))) {</span><br><span style="color: hsl(120, 100%, 40%);">+            /* We need to catch both pointers here since MS may become freed</span><br><span style="color: hsl(120, 100%, 40%);">+                 after first tbf_free(dl_tbf) if only DL TBF was available */</span><br><span style="color: hsl(120, 100%, 40%);">+               dl_tbf = ms->dl_tbf();</span><br><span style="color: hsl(120, 100%, 40%);">+             ul_tbf = ms->ul_tbf();</span><br><span style="color: hsl(120, 100%, 40%);">+             if (dl_tbf)</span><br><span style="color: hsl(120, 100%, 40%);">+                   tbf_free(dl_tbf);</span><br><span style="color: hsl(120, 100%, 40%);">+             if (ul_tbf)</span><br><span style="color: hsl(120, 100%, 40%);">+                   tbf_free(ul_tbf);</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  if (!bctx)</span><br><span>           return -1;</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/20245">change 20245</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-pcu/+/20245"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I4ae1c3706b2ed6e4d271cd16f7cd7f8937b84836 </div>
<div style="display:none"> Gerrit-Change-Number: 20245 </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>