Change in ...osmo-bsc[master]: make bsc_clear_request() static
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/14699 ) Change subject: make bsc_clear_request() static .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14699 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic89d0afad42e4b11183a13d2dc6b7bbf0b822fd9 Gerrit-Change-Number: 14699 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 09 Jul 2019 09:45:05 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in ...osmo-bsc[master]: make bsc_clear_request() static
laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-bsc/+/14699 ) Change subject: make bsc_clear_request() static .. make bsc_clear_request() static bsc_clear_request() is in fact used only within gsm_08_08.c, make it static to that file. Since the gscon FSM, "real" BSSMAP Clear are sent only by gscon_bssmap_clear(). bsc_clear_request() remains in use for legacy code paths in gsm_08_08.c: - the bsc_filter, i.e. for IMSI filtering; - in move_to_msc(), from handle_cc_setup(), a code path that is in fact not entirely clear to me. It seems to be an old functionality to serve multiple MSCs? Both of which I personally haven't seen in use, are not tested and should probably be completely removed. For now contain legacy code in the static context. Adjust comment. Change-Id: Ic89d0afad42e4b11183a13d2dc6b7bbf0b822fd9 --- M include/osmocom/bsc/gsm_08_08.h M src/osmo-bsc/gsm_08_08.c M tests/bsc/bsc_test.c M tests/handover/handover_test.c 4 files changed, 4 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/bsc/gsm_08_08.h b/include/osmocom/bsc/gsm_08_08.h index 5241295..b46a8d3 100644 --- a/include/osmocom/bsc/gsm_08_08.h +++ b/include/osmocom/bsc/gsm_08_08.h @@ -10,7 +10,6 @@ void bsc_cipher_mode_compl(struct gsm_subscriber_connection *conn, struct msgb *msg, uint8_t chosen_encr); int bsc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg, uint16_t chosen_channel); void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg); -int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause); void bsc_cm_update(struct gsm_subscriber_connection *conn, const uint8_t *cm2, uint8_t cm2_len, const uint8_t *cm3, uint8_t cm3_len); diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c index 2c6a689..6ca5455 100644 --- a/src/osmo-bsc/gsm_08_08.c +++ b/src/osmo-bsc/gsm_08_08.c @@ -509,6 +509,8 @@ return false; } +static int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause); + /* * Plastic surgery... we want to give up the current connection */ @@ -635,8 +637,8 @@ return; } -/*! BSC->MSC: RR conn has been cleared. */ -int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause) +/*! BSSMAP Clear Request for legacy code paths, instead see gscon_bssmap_clear(). */ +static int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause) { int rc; struct msgb *resp; diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index 8e88ba8..492f0c5 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -243,8 +243,6 @@ void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg) {} void bsc_assign_compl(struct gsm_subscriber_connection *conn, uint8_t rr_cause) {} void bsc_assign_fail(struct gsm_subscriber_connection *conn, uint8_t cause, uint8_t *rr_cause) {} -int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause) -{ return 0; } void bsc_cm_update(struct gsm_subscriber_connection *conn, const uint8_t *cm2, uint8_t cm2_len, const uint8_t *cm3, uint8_t cm3_len) {} diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index a8a77be..bedf6f9 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -1779,8 +1779,6 @@ { return 0; } void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg) {} void bsc_assign_compl(struct gsm_subscriber_connection *conn, uint8_t rr_cause) {} -int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause) -{ return 0; } void bsc_cm_update(struct gsm_subscriber_connection *conn, const uint8_t *cm2, uint8_t cm2_len, const uint8_t *cm3, uint8_t cm3_len) {} -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14699 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic89d0afad42e4b11183a13d2dc6b7bbf0b822fd9 Gerrit-Change-Number: 14699 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged
Change in ...osmo-bsc[master]: make bsc_clear_request() static
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/14699 Change subject: make bsc_clear_request() static .. make bsc_clear_request() static bsc_clear_request() is in fact used only within gsm_08_08.c, make it static to that file. Since the gscon FSM, "real" BSSMAP Clear are sent only by gscon_bssmap_clear(). bsc_clear_request() remains in use for legacy code paths in gsm_08_08.c: - the bsc_filter, i.e. for IMSI filtering; - in move_to_msc(), from handle_cc_setup(), a code path that is in fact not entirely clear to me. It seems to be an old functionality to serve multiple MSCs? Both of which I personally haven't seen in use, are not tested and should probably be completely removed. For now contain legacy code in the static context. Adjust comment. Change-Id: Ic89d0afad42e4b11183a13d2dc6b7bbf0b822fd9 --- M include/osmocom/bsc/gsm_08_08.h M src/osmo-bsc/gsm_08_08.c M tests/bsc/bsc_test.c M tests/handover/handover_test.c 4 files changed, 4 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/99/14699/1 diff --git a/include/osmocom/bsc/gsm_08_08.h b/include/osmocom/bsc/gsm_08_08.h index 5241295..b46a8d3 100644 --- a/include/osmocom/bsc/gsm_08_08.h +++ b/include/osmocom/bsc/gsm_08_08.h @@ -10,7 +10,6 @@ void bsc_cipher_mode_compl(struct gsm_subscriber_connection *conn, struct msgb *msg, uint8_t chosen_encr); int bsc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg, uint16_t chosen_channel); void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg); -int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause); void bsc_cm_update(struct gsm_subscriber_connection *conn, const uint8_t *cm2, uint8_t cm2_len, const uint8_t *cm3, uint8_t cm3_len); diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c index 2c6a689..6ca5455 100644 --- a/src/osmo-bsc/gsm_08_08.c +++ b/src/osmo-bsc/gsm_08_08.c @@ -509,6 +509,8 @@ return false; } +static int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause); + /* * Plastic surgery... we want to give up the current connection */ @@ -635,8 +637,8 @@ return; } -/*! BSC->MSC: RR conn has been cleared. */ -int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause) +/*! BSSMAP Clear Request for legacy code paths, instead see gscon_bssmap_clear(). */ +static int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause) { int rc; struct msgb *resp; diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index 8e88ba8..492f0c5 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -243,8 +243,6 @@ void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg) {} void bsc_assign_compl(struct gsm_subscriber_connection *conn, uint8_t rr_cause) {} void bsc_assign_fail(struct gsm_subscriber_connection *conn, uint8_t cause, uint8_t *rr_cause) {} -int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause) -{ return 0; } void bsc_cm_update(struct gsm_subscriber_connection *conn, const uint8_t *cm2, uint8_t cm2_len, const uint8_t *cm3, uint8_t cm3_len) {} diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index a8a77be..bedf6f9 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -1779,8 +1779,6 @@ { return 0; } void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg) {} void bsc_assign_compl(struct gsm_subscriber_connection *conn, uint8_t rr_cause) {} -int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause) -{ return 0; } void bsc_cm_update(struct gsm_subscriber_connection *conn, const uint8_t *cm2, uint8_t cm2_len, const uint8_t *cm3, uint8_t cm3_len) {} -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14699 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic89d0afad42e4b11183a13d2dc6b7bbf0b822fd9 Gerrit-Change-Number: 14699 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange