[PATCH] osmo-msc[master]: remove bsc_api.h and all users - they're all dead code

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Feb 13 23:29:09 UTC 2018


Review at  https://gerrit.osmocom.org/6412

remove bsc_api.h and all users - they're all dead code

Related: OS#2528
Change-Id: I332aa8697c98a0d7b3db65f98711275da3d381d7
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/bsc_api.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_data_shared.h
M include/osmocom/msc/osmo_msc.h
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_14.c
M src/libmsc/osmo_msc.c
M tests/msc_vlr/msc_vlr_tests.c
9 files changed, 1 insertion(+), 77 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/12/6412/1

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index d31883a..f0e24c4 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -1,7 +1,6 @@
 noinst_HEADERS = \
 	a_iface.h \
 	a_iface_bssap.h \
-	bsc_api.h \
 	common.h \
 	common_cs.h \
 	db.h \
diff --git a/include/osmocom/msc/bsc_api.h b/include/osmocom/msc/bsc_api.h
deleted file mode 100644
index 4936f53..0000000
--- a/include/osmocom/msc/bsc_api.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* GSM 08.08 like API for OpenBSC */
-
-#ifndef OPENBSC_BSC_API_H
-#define OPENBSC_BSC_API_H
-
-#include "gsm_data.h"
-
-#define BSC_API_CONN_POL_ACCEPT	0
-#define BSC_API_CONN_POL_REJECT	1
-
-struct bsc_api {
-	/*! \brief BTS->MSC: tell MSC a SAPI was not established */
-	void (*sapi_n_reject)(struct gsm_subscriber_connection *conn, int dlci);
-	/*! \brief MS->MSC: Tell MSC that ciphering has been enabled */
-	void (*cipher_mode_compl)(struct gsm_subscriber_connection *conn,
-				  struct msgb *msg, uint8_t chosen_encr);
-	/*! \brief MS->MSC: New MM context with L3 payload */
-	int (*compl_l3)(struct gsm_subscriber_connection *conn,
-			struct msgb *msg, uint16_t chosen_channel); 
-	/*! \brief MS->BSC/MSC: Um L3 message */
-	void (*dtap)(struct gsm_subscriber_connection *conn, uint8_t link_id,
-			struct msgb *msg);
-	/*! \brief BSC->MSC: Assignment of lchan successful */
-	void (*assign_compl)(struct gsm_subscriber_connection *conn,
-			  uint8_t rr_cause, uint8_t chosen_channel,
-			  uint8_t encr_alg_id, uint8_t speech_mode);
-	/*! \brief BSC->MSC: Assignment of lchan failed */
-	void (*assign_fail)(struct gsm_subscriber_connection *conn,
-			 uint8_t cause, uint8_t *rr_cause);
-	/*! \brief BSC->MSC: RR conn has been cleared */
-	int (*clear_request)(struct gsm_subscriber_connection *conn,
-			      uint32_t cause);
-	/*! \brief BSC->MSC: Classmark Update */
-	void (*classmark_chg)(struct gsm_subscriber_connection *conn,
-			      const uint8_t *cm2, uint8_t cm2_len,
-			      const uint8_t *cm3, uint8_t cm3_len);
-
-	/**
-	 * Configure the multirate setting on this channel. If it is
-	 * not implemented AMR5.9 will be used.
-	 */
-	void (*mr_config)(struct gsm_subscriber_connection *conn,
-				struct gsm_lchan *lchan, int full_rate);
-
-	/** Callback for additional actions during conn cleanup */
-	void (*conn_cleanup)(struct gsm_subscriber_connection *conn);
-};
-
-#endif
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 3e4b5a8..561cf3d 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -344,7 +344,6 @@
 	 * we have a subscriber connection.
 	 */
 	struct llist_head trans_list;
-	struct bsc_api *bsc_api;
 
 	unsigned int paging_response_timer;
 
diff --git a/include/osmocom/msc/gsm_data_shared.h b/include/osmocom/msc/gsm_data_shared.h
index 68b36ab..857946d 100644
--- a/include/osmocom/msc/gsm_data_shared.h
+++ b/include/osmocom/msc/gsm_data_shared.h
@@ -44,7 +44,6 @@
 struct gsm_mncc;
 struct osmo_rtp_socket;
 struct rtp_socket;
-struct bsc_api;
 
 /*
  * help with parsing regexps
diff --git a/include/osmocom/msc/osmo_msc.h b/include/osmocom/msc/osmo_msc.h
index 2fa8c46..2b019e1 100644
--- a/include/osmocom/msc/osmo_msc.h
+++ b/include/osmocom/msc/osmo_msc.h
@@ -8,8 +8,6 @@
 
 #include <osmocom/msc/gsm_data.h>
 
-#include "bsc_api.h"
-
 #define MSC_HLR_REMOTE_IP_DEFAULT "127.0.0.1"
 #define MSC_HLR_REMOTE_PORT_DEFAULT OSMO_GSUP_PORT
 
@@ -55,8 +53,6 @@
 	MSC_CONN_ACCEPT = 0,
 	MSC_CONN_REJECT = 1,
 };
-
-struct bsc_api *msc_bsc_api();
 
 int msc_create_conn_fsm(struct gsm_subscriber_connection *conn, const char *id);
 
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index a5b967e..b928171 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -46,7 +46,6 @@
 #include <osmocom/msc/transaction.h>
 #include <osmocom/msc/ussd.h>
 #include <osmocom/msc/silent_call.h>
-#include <osmocom/msc/bsc_api.h>
 #include <osmocom/msc/osmo_msc.h>
 #include <osmocom/msc/mncc_int.h>
 #include <osmocom/abis/e1_input.h>
diff --git a/src/libmsc/gsm_04_14.c b/src/libmsc/gsm_04_14.c
index 6d75bba..2be534c 100644
--- a/src/libmsc/gsm_04_14.c
+++ b/src/libmsc/gsm_04_14.c
@@ -30,7 +30,6 @@
 #include <osmocom/msc/gsm_data.h>
 #include <osmocom/msc/gsm_subscriber.h>
 #include <osmocom/msc/gsm_04_08.h>
-#include <osmocom/msc/bsc_api.h>
 #include <osmocom/msc/msc_ifaces.h>
 
 #include <osmocom/gsm/gsm48.h>
diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c
index 755f8aa..1478c19 100644
--- a/src/libmsc/osmo_msc.c
+++ b/src/libmsc/osmo_msc.c
@@ -22,7 +22,6 @@
  */
 
 #include <osmocom/msc/osmo_msc.h>
-#include <osmocom/msc/bsc_api.h>
 #include <osmocom/msc/debug.h>
 #include <osmocom/msc/transaction.h>
 #include <osmocom/msc/db.h>
@@ -261,23 +260,6 @@
 {
 	msc_subscr_conn_close(conn, cause);
 	return 1;
-}
-
-/* MSC-level operations to be called by libbsc in NITB */
-static struct bsc_api msc_handler = {
-	.sapi_n_reject = msc_sapi_n_reject,
-	.compl_l3 = msc_compl_l3,
-	.dtap = msc_dtap,
-	.clear_request = msc_clear_request,
-	.assign_compl = msc_assign_compl,
-	.assign_fail = msc_assign_fail,
-	.classmark_chg = msc_classmark_chg,
-	.cipher_mode_compl = msc_cipher_mode_compl,
-	.conn_cleanup = msc_subscr_con_cleanup,
-};
-
-struct bsc_api *msc_bsc_api() {
-	return &msc_handler;
 }
 
 static void msc_subscr_conn_release_all(struct gsm_subscriber_connection *conn, uint32_t cause)
diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c
index 556bf49..1079c9f 100644
--- a/tests/msc_vlr/msc_vlr_tests.c
+++ b/tests/msc_vlr/msc_vlr_tests.c
@@ -219,7 +219,7 @@
 		reset_l3_seq_nr();
 		patch_l3_seq_nr(msg);
 		rc = msc_compl_l3(g_conn, msg, 23);
-		if (rc == BSC_API_CONN_POL_REJECT) {
+		if (rc != MSC_CONN_ACCEPT) {
 			msc_subscr_con_free(g_conn);
 			g_conn = NULL;
 		}

-- 
To view, visit https://gerrit.osmocom.org/6412
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I332aa8697c98a0d7b3db65f98711275da3d381d7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list