<p>neels <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/21662">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">handover_test: set a fake osmo_mgcpc_ep_ci pointer<br><br>The handover_fsm activates voice on a target lchan only when the source<br>lchan has an osmo_mgcpc_ep_ci pointer for the BTS side. Since that<br>struct is opaque, set a fake pointer and override the<br>osmo_mgcpc_ep_ci_name() function so that the pointer is never<br>dereferenced.<br><br>This more accurately models the RTP stream setup events during handover.<br><br>Change-Id: Ibc22001bf9e9874dd3f44f0acac8b6a4c1069aa7<br>---<br>M tests/handover/handover_test.c<br>1 file changed, 10 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c</span><br><span>index 92d25da..cbe0cf3 100644</span><br><span>--- a/tests/handover/handover_test.c</span><br><span>+++ b/tests/handover/handover_test.c</span><br><span>@@ -381,6 +381,8 @@</span><br><span>      lchan->fi->state = LCHAN_ST_ESTABLISHED;</span><br><span>       lchan->ts->fi->state = TS_ST_IN_USE;</span><br><span>        lchan->type = full_rate ? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H;</span><br><span style="color: hsl(120, 100%, 40%);">+       /* Fake osmo_mgcpc_ep_ci to indicate that the lchan is used for voice */</span><br><span style="color: hsl(120, 100%, 40%);">+      lchan->mgw_endpoint_ci_bts = (void*)1;</span><br><span> </span><br><span>        if (lchan->ts->pchan_on_init == GSM_PCHAN_TCH_F_TCH_H_PDCH)</span><br><span>            lchan->ts->pchan_is = full_rate ? GSM_PCHAN_TCH_F : GSM_PCHAN_TCH_H;</span><br><span>@@ -1346,3 +1348,11 @@</span><br><span> void osmo_bsc_sigtran_reset(void) {}</span><br><span> void bssmap_reset_alloc(void) {}</span><br><span> void bssmap_reset_is_conn_ready(void) {}</span><br><span style="color: hsl(120, 100%, 40%);">+const char *osmo_mgcpc_ep_name(const struct osmo_mgcpc_ep *ep)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+        return "fake-ep";</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+const char *osmo_mgcpc_ep_ci_name(const struct osmo_mgcpc_ep_ci *ci)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       return "fake-ci";</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/21662">change 21662</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/+/21662"/><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: Ibc22001bf9e9874dd3f44f0acac8b6a4c1069aa7 </div>
<div style="display:none"> Gerrit-Change-Number: 21662 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>