<p>neels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/14699">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">make bsc_clear_request() static<br><br>bsc_clear_request() is in fact used only within gsm_08_08.c, make it static to<br>that file.<br><br>Since the gscon FSM, "real" BSSMAP Clear are sent only by gscon_bssmap_clear().<br><br>bsc_clear_request() remains in use for legacy code paths in gsm_08_08.c:<br>- the bsc_filter, i.e. for IMSI filtering;<br>- in move_to_msc(), from handle_cc_setup(), a code path that is in fact not<br>  entirely clear to me. It seems to be an old functionality to serve multiple<br>  MSCs?<br><br>Both of which I personally haven't seen in use, are not tested and should<br>probably be completely removed.<br><br>For now contain legacy code in the static context.<br><br>Adjust comment.<br><br>Change-Id: Ic89d0afad42e4b11183a13d2dc6b7bbf0b822fd9<br>---<br>M include/osmocom/bsc/gsm_08_08.h<br>M src/osmo-bsc/gsm_08_08.c<br>M tests/bsc/bsc_test.c<br>M tests/handover/handover_test.c<br>4 files changed, 4 insertions(+), 7 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/99/14699/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/bsc/gsm_08_08.h b/include/osmocom/bsc/gsm_08_08.h</span><br><span>index 5241295..b46a8d3 100644</span><br><span>--- a/include/osmocom/bsc/gsm_08_08.h</span><br><span>+++ b/include/osmocom/bsc/gsm_08_08.h</span><br><span>@@ -10,7 +10,6 @@</span><br><span> void bsc_cipher_mode_compl(struct gsm_subscriber_connection *conn, struct msgb *msg, uint8_t chosen_encr);</span><br><span> int bsc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg, uint16_t chosen_channel);</span><br><span> void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg);</span><br><span style="color: hsl(0, 100%, 40%);">-int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause);</span><br><span> void bsc_cm_update(struct gsm_subscriber_connection *conn,</span><br><span>                 const uint8_t *cm2, uint8_t cm2_len,</span><br><span>                 const uint8_t *cm3, uint8_t cm3_len);</span><br><span>diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c</span><br><span>index 2c6a689..6ca5455 100644</span><br><span>--- a/src/osmo-bsc/gsm_08_08.c</span><br><span>+++ b/src/osmo-bsc/gsm_08_08.c</span><br><span>@@ -509,6 +509,8 @@</span><br><span>  return false;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+static int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /*</span><br><span>  * Plastic surgery... we want to give up the current connection</span><br><span>  */</span><br><span>@@ -635,8 +637,8 @@</span><br><span>        return;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/*! BSC->MSC: RR conn has been cleared. */</span><br><span style="color: hsl(0, 100%, 40%);">-int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause)</span><br><span style="color: hsl(120, 100%, 40%);">+/*! BSSMAP Clear Request for legacy code paths, instead see gscon_bssmap_clear(). */</span><br><span style="color: hsl(120, 100%, 40%);">+static int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause)</span><br><span> {</span><br><span>  int rc;</span><br><span>      struct msgb *resp;</span><br><span>diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c</span><br><span>index 8e88ba8..492f0c5 100644</span><br><span>--- a/tests/bsc/bsc_test.c</span><br><span>+++ b/tests/bsc/bsc_test.c</span><br><span>@@ -243,8 +243,6 @@</span><br><span> void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg) {}</span><br><span> void bsc_assign_compl(struct gsm_subscriber_connection *conn, uint8_t rr_cause) {}</span><br><span> void bsc_assign_fail(struct gsm_subscriber_connection *conn, uint8_t cause, uint8_t *rr_cause) {}</span><br><span style="color: hsl(0, 100%, 40%);">-int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause)</span><br><span style="color: hsl(0, 100%, 40%);">-{ return 0; }</span><br><span> void bsc_cm_update(struct gsm_subscriber_connection *conn,</span><br><span>                 const uint8_t *cm2, uint8_t cm2_len,</span><br><span>                 const uint8_t *cm3, uint8_t cm3_len) {}</span><br><span>diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c</span><br><span>index a8a77be..bedf6f9 100644</span><br><span>--- a/tests/handover/handover_test.c</span><br><span>+++ b/tests/handover/handover_test.c</span><br><span>@@ -1779,8 +1779,6 @@</span><br><span> { return 0; }</span><br><span> void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg) {}</span><br><span> void bsc_assign_compl(struct gsm_subscriber_connection *conn, uint8_t rr_cause) {}</span><br><span style="color: hsl(0, 100%, 40%);">-int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause)</span><br><span style="color: hsl(0, 100%, 40%);">-{ return 0; }</span><br><span> void bsc_cm_update(struct gsm_subscriber_connection *conn,</span><br><span>                   const uint8_t *cm2, uint8_t cm2_len,</span><br><span>                 const uint8_t *cm3, uint8_t cm3_len) {}</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/14699">change 14699</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/+/14699"/><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: Ic89d0afad42e4b11183a13d2dc6b7bbf0b822fd9 </div>
<div style="display:none"> Gerrit-Change-Number: 14699 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>