summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-03 23:19:40 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-03 23:22:16 +0100
commit058c480b976a67eead7b109d8c7412e68954bd84 (patch)
treeacd56a3ffafe0d6cd70320b4bde55332dd09b181
parent05bec8099da78b2bfc17219f878829289c5e7e16 (diff)
decouple from bsc_api and bts
-rw-r--r--openbsc/include/openbsc/osmo_msc.h3
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c4
-rw-r--r--openbsc/src/libmsc/osmo_msc.c8
-rw-r--r--openbsc/tests/msc_vlr/msc_vlr_test_gsm_authen.err10
-rw-r--r--openbsc/tests/msc_vlr/msc_vlr_test_gsm_ciph.err10
-rw-r--r--openbsc/tests/msc_vlr/msc_vlr_test_hlr_reject.err16
-rw-r--r--openbsc/tests/msc_vlr/msc_vlr_test_hlr_timeout.err4
-rw-r--r--openbsc/tests/msc_vlr/msc_vlr_test_ms_timeout.err12
-rw-r--r--openbsc/tests/msc_vlr/msc_vlr_test_no_authen.err8
-rw-r--r--openbsc/tests/msc_vlr/msc_vlr_test_reject_concurrency.err20
-rw-r--r--openbsc/tests/msc_vlr/msc_vlr_test_rest.err8
-rw-r--r--openbsc/tests/msc_vlr/msc_vlr_test_umts_authen.err8
-rw-r--r--openbsc/tests/msc_vlr/msc_vlr_tests.c10
13 files changed, 61 insertions, 60 deletions
diff --git a/openbsc/include/openbsc/osmo_msc.h b/openbsc/include/openbsc/osmo_msc.h
index 4fb721c..3695b74 100644
--- a/openbsc/include/openbsc/osmo_msc.h
+++ b/openbsc/include/openbsc/osmo_msc.h
@@ -76,6 +76,9 @@ int msc_vlr_start(struct gsm_network *net);
int msc_compl_l3(struct gsm_subscriber_connection *conn,
struct msgb *msg, uint16_t chosen_channel);
+void msc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg);
+void msc_cipher_mode_compl(struct gsm_subscriber_connection *conn,
+ struct msgb *msg, uint8_t alg_id);
void msc_release_connection(struct gsm_subscriber_connection *conn);
bool msc_subscr_conn_is_accepted(struct gsm_subscriber_connection *conn);
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 7b1a738..f95e42d 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -405,7 +405,7 @@ int mm_rx_loc_upd_req(struct gsm_subscriber_connection *conn, struct msgb *msg)
&old_lai.plmn.mnc, &old_lai.lac);
new_lai.plmn.mcc = conn->network->country_code;
new_lai.plmn.mnc = conn->network->network_code;
- new_lai.lac = conn->bts->location_area_code;
+ new_lai.lac = conn->lac;
DEBUGP(DMM, "LU/new-LAC: %u/%u\n", old_lai.lac, new_lai.lac);
lu_fsm = vlr_loc_update(conn->conn_fsm,
@@ -674,7 +674,7 @@ int gsm48_rx_mm_serv_req(struct gsm_subscriber_connection *conn, struct msgb *ms
lai.plmn.mcc = conn->network->country_code;
lai.plmn.mnc = conn->network->network_code;
- lai.lac = conn->bts->location_area_code;
+ lai.lac = conn->lac;
DEBUGP(DMM, "<- CM SERVICE REQUEST ");
if (msg->data_len < sizeof(struct gsm48_service_request*)) {
diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c
index d888c48..cee241a 100644
--- a/openbsc/src/libmsc/osmo_msc.c
+++ b/openbsc/src/libmsc/osmo_msc.c
@@ -74,7 +74,7 @@ static void subscr_conn_bump(struct gsm_subscriber_connection *conn)
}
/* Receive a DTAP message from BSC */
-static void msc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg)
+void msc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg)
{
gsm0408_dispatch(conn, msg);
@@ -111,8 +111,8 @@ static void msc_classmark_chg(struct gsm_subscriber_connection *conn,
}
/* Receive a CIPHERING MODE COMPLETE from BSC */
-static void msc_ciph_m_compl(struct gsm_subscriber_connection *conn,
- struct msgb *msg, uint8_t alg_id)
+void msc_cipher_mode_compl(struct gsm_subscriber_connection *conn,
+ struct msgb *msg, uint8_t alg_id)
{
struct gsm48_hdr *gh = msgb_l3(msg);
unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh);
@@ -227,7 +227,7 @@ static struct bsc_api msc_handler = {
.assign_compl = msc_assign_compl,
.assign_fail = msc_assign_fail,
.classmark_chg = msc_classmark_chg,
- .cipher_mode_compl = msc_ciph_m_compl,
+ .cipher_mode_compl = msc_cipher_mode_compl,
.conn_cleanup = msc_subscr_con_cleanup,
};
diff --git a/openbsc/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/openbsc/tests/msc_vlr/msc_vlr_test_gsm_authen.err
index 901edd9..2e9a6fb 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_test_gsm_authen.err
+++ b/openbsc/tests/msc_vlr/msc_vlr_test_gsm_authen.err
@@ -397,7 +397,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_gsm_authen: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_gsm_authen_tmsi
- Location Update request causes a GSUP Send Auth Info request to HLR
@@ -985,7 +985,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_gsm_authen_tmsi: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_gsm_authen_imei
- Location Update request causes a GSUP Send Auth Info request to HLR
@@ -1189,7 +1189,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_gsm_authen_imei: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_gsm_authen_tmsi_imei
- Location Update request causes a GSUP Send Auth Info request to HLR
@@ -1421,7 +1421,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_gsm_authen_tmsi_imei: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_gsm_milenage_authen
- Location Update request causes a GSUP Send Auth Info request to HLR
@@ -1803,7 +1803,7 @@ DREF freeing VLR subscr MSISDN:42342
===== test_gsm_milenage_authen: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 9
diff --git a/openbsc/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/openbsc/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
index 4e2ed5d..d7b8145 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
+++ b/openbsc/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
@@ -432,7 +432,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_ciph: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_ciph_tmsi
- Location Update request causes a GSUP Send Auth Info request to HLR
@@ -903,7 +903,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_ciph_tmsi: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_ciph_imei
- Location Update request causes a GSUP Send Auth Info request to HLR
@@ -1107,7 +1107,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_ciph_imei: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_ciph_imeisv
- Location Update request causes a GSUP Send Auth Info request to HLR
@@ -1309,7 +1309,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_ciph_imeisv: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_ciph_tmsi_imei
- Location Update request causes a GSUP Send Auth Info request to HLR
@@ -1541,7 +1541,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_ciph_tmsi_imei: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 9
diff --git a/openbsc/tests/msc_vlr/msc_vlr_test_hlr_reject.err b/openbsc/tests/msc_vlr/msc_vlr_test_hlr_reject.err
index a6c2d82..53fffa5 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_test_hlr_reject.err
+++ b/openbsc/tests/msc_vlr/msc_vlr_test_hlr_reject.err
@@ -64,7 +64,7 @@ DREF freeing VLR subscr IMSI:901700000004620
===== test_hlr_rej_auth_info_unknown_imsi: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_hlr_rej_auth_info_net_fail
- Location Update request causes a GSUP Send Auth Info request to HLR
@@ -132,7 +132,7 @@ DREF freeing VLR subscr IMSI:901700000004620
===== test_hlr_rej_auth_info_net_fail: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_hlr_rej_auth_info_net_fail_reuse_tuples
---
@@ -409,7 +409,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_hlr_rej_auth_info_net_fail_reuse_tuples: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_hlr_rej_auth_info_net_fail_no_reuse_tuples
---
@@ -616,7 +616,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_hlr_rej_auth_info_net_fail_no_reuse_tuples: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples
---
@@ -824,7 +824,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_hlr_acc_but_no_auth_tuples
- Location Update request causes a GSUP Send Auth Info request to HLR
@@ -891,7 +891,7 @@ DREF freeing VLR subscr IMSI:901700000004620
===== test_hlr_acc_but_no_auth_tuples: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_hlr_rej_lu
- Location Update request causes a GSUP LU request to HLR
@@ -961,7 +961,7 @@ DREF freeing VLR subscr IMSI:901700000004620
===== test_hlr_rej_lu: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_hlr_no_insert_data
- Location Update request causes a GSUP LU request to HLR
@@ -1053,7 +1053,7 @@ DREF freeing VLR subscr IMSI:901700000004620
===== test_hlr_no_insert_data: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 9
diff --git a/openbsc/tests/msc_vlr/msc_vlr_test_hlr_timeout.err b/openbsc/tests/msc_vlr/msc_vlr_test_hlr_timeout.err
index 0349169..e012de9 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_test_hlr_timeout.err
+++ b/openbsc/tests/msc_vlr/msc_vlr_test_hlr_timeout.err
@@ -72,7 +72,7 @@ DVLR Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_C
===== test_hlr_timeout_lu_auth_info: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_hlr_timeout_lu_upd_loc_result
- Total time passed: 0.000000 s
@@ -166,7 +166,7 @@ DVLR Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_C
===== test_hlr_timeout_lu_upd_loc_result: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 9
diff --git a/openbsc/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/openbsc/tests/msc_vlr/msc_vlr_test_ms_timeout.err
index 550a202..63e0218 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_test_ms_timeout.err
+++ b/openbsc/tests/msc_vlr/msc_vlr_test_ms_timeout.err
@@ -92,7 +92,7 @@ DVLR Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_C
===== test_ms_timeout_lu_auth_resp: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_ms_timeout_cm_auth_resp
- Total time passed: 0.000000 s
@@ -307,7 +307,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_ms_timeout_cm_auth_resp: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_ms_timeout_cm_after_accepted
- Total time passed: 0.000000 s
@@ -497,7 +497,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_ms_timeout_cm_after_accepted: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_ms_timeout_cm_after_auth
- Total time passed: 0.000000 s
@@ -749,7 +749,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_ms_timeout_cm_after_auth: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_ms_timeout_paging_after_accepted
- Total time passed: 0.000000 s
@@ -966,7 +966,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_ms_timeout_paging_after_accepted: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_ms_timeout_paging_after_auth
- Total time passed: 0.000000 s
@@ -1268,7 +1268,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_ms_timeout_paging_after_auth: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 9
diff --git a/openbsc/tests/msc_vlr/msc_vlr_test_no_authen.err b/openbsc/tests/msc_vlr/msc_vlr_test_no_authen.err
index 88c91d3..e81d76b 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_test_no_authen.err
+++ b/openbsc/tests/msc_vlr/msc_vlr_test_no_authen.err
@@ -283,7 +283,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_no_authen: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_no_authen_tmsi
- Location Update request causes a GSUP LU request to HLR
@@ -740,7 +740,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_no_authen_tmsi: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_no_authen_imei
- Location Update request causes a GSUP LU request to HLR
@@ -900,7 +900,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_no_authen_imei: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_no_authen_tmsi_imei
- Location Update request causes a GSUP LU request to HLR
@@ -1082,7 +1082,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_no_authen_tmsi_imei: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 9
diff --git a/openbsc/tests/msc_vlr/msc_vlr_test_reject_concurrency.err b/openbsc/tests/msc_vlr/msc_vlr_test_reject_concurrency.err
index e32f89f..822811b 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_test_reject_concurrency.err
+++ b/openbsc/tests/msc_vlr/msc_vlr_test_reject_concurrency.err
@@ -135,7 +135,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_reject_2nd_conn: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_reject_lu_during_lu
- Location Update Request
@@ -247,7 +247,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_reject_lu_during_lu: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_reject_cm_during_lu
- Location Update Request
@@ -361,7 +361,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_reject_cm_during_lu: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_reject_paging_resp_during_lu
- Location Update Request
@@ -474,7 +474,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_reject_paging_resp_during_lu: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_reject_lu_during_cm
---
@@ -631,7 +631,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_reject_lu_during_cm: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_reject_cm_during_cm
---
@@ -789,7 +789,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_reject_cm_during_cm: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_reject_paging_resp_during_cm
---
@@ -964,7 +964,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_reject_paging_resp_during_cm: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_reject_lu_during_paging_resp
---
@@ -1162,7 +1162,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_reject_lu_during_paging_resp: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_reject_cm_during_paging_resp
---
@@ -1361,7 +1361,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_reject_cm_during_paging_resp: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_reject_paging_resp_during_paging_resp
---
@@ -1558,7 +1558,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_reject_paging_resp_during_paging_resp: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 9
diff --git a/openbsc/tests/msc_vlr/msc_vlr_test_rest.err b/openbsc/tests/msc_vlr/msc_vlr_test_rest.err
index f48ce31..f869416 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_test_rest.err
+++ b/openbsc/tests/msc_vlr/msc_vlr_test_rest.err
@@ -35,7 +35,7 @@ DVLR Subscr_Conn(test){SUBSCR_CONN_S_RELEASED}: Deallocated
===== test_early_stage: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_cm_service_without_lu
- CM Service Request without a prior Location Updating
@@ -71,7 +71,7 @@ DVLR Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated
===== test_cm_service_without_lu: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_two_lu
- Location Update request causes a GSUP LU request to HLR
@@ -307,7 +307,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_two_lu: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_lu_unknown_tmsi
- Location Update request with unknown TMSI sends ID Request for IMSI
@@ -443,7 +443,7 @@ DREF freeing VLR subscr MSISDN:46071
===== test_lu_unknown_tmsi: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 9
diff --git a/openbsc/tests/msc_vlr/msc_vlr_test_umts_authen.err b/openbsc/tests/msc_vlr/msc_vlr_test_umts_authen.err
index b07eb0f..ddba414 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_test_umts_authen.err
+++ b/openbsc/tests/msc_vlr/msc_vlr_test_umts_authen.err
@@ -381,7 +381,7 @@ DREF freeing VLR subscr MSISDN:42342
===== test_umts_authen_geran: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_umts_authen_utran
- Location Update request causes a GSUP Send Auth Info request to HLR
@@ -766,7 +766,7 @@ DREF freeing VLR subscr MSISDN:42342
===== test_umts_authen_utran: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_umts_authen_resync_geran
- Location Update request causes a GSUP Send Auth Info request to HLR
@@ -933,7 +933,7 @@ DREF freeing VLR subscr MSISDN:42342
===== test_umts_authen_resync_geran: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
===== test_umts_authen_resync_utran
- Location Update request causes a GSUP Send Auth Info request to HLR
@@ -1100,7 +1100,7 @@ DREF freeing VLR subscr MSISDN:42342
===== test_umts_authen_resync_utran: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 75
+talloc_total_blocks(tall_bsc_ctx) == 9
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 9
diff --git a/openbsc/tests/msc_vlr/msc_vlr_tests.c b/openbsc/tests/msc_vlr/msc_vlr_tests.c
index d8eada1..7a9e2d8 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_tests.c
+++ b/openbsc/tests/msc_vlr/msc_vlr_tests.c
@@ -152,7 +152,7 @@ void rx_from_ms(struct msgb *msg)
if (!g_conn) {
log("new conn");
g_conn = conn_new();
- rc = net->bsc_api->compl_l3(g_conn, msg, 23);
+ rc = msc_compl_l3(g_conn, msg, 23);
if (rc == BSC_API_CONN_POL_REJECT) {
msc_subscr_con_free(g_conn);
g_conn = NULL;
@@ -160,9 +160,9 @@ void rx_from_ms(struct msgb *msg)
} else {
if ((gsm48_hdr_pdisc(gh) == GSM48_PDISC_RR)
&& (gsm48_hdr_msg_type(gh) == GSM48_MT_RR_CIPH_M_COMPL))
- net->bsc_api->cipher_mode_compl(g_conn, msg, 0);
+ msc_cipher_mode_compl(g_conn, msg, 0);
else
- net->bsc_api->dtap(g_conn, 23, msg);
+ msc_dtap(g_conn, 23, msg);
}
if (g_conn && !conn_exists(g_conn))
@@ -644,7 +644,7 @@ void run_tests(int nr)
if (cmdline_opts.verbose)
fprintf(stderr, "(test nr %d)\n", test_nr + 1);
- check_talloc(msgb_ctx, tall_bsc_ctx, 75);
+ check_talloc(msgb_ctx, tall_bsc_ctx, 9);
} while(0);
}
@@ -665,8 +665,6 @@ int main(int argc, char **argv)
log_set_print_category(osmo_stderr_target, 1);
net = gsm_network_init(tall_bsc_ctx, 1, 1, fake_mncc_recv);
- bsc_api_init(net, msc_bsc_api());
- the_bts = gsm_bts_alloc(net);
net->gsup_server_addr_str = talloc_strdup(net, "no_gsup_server");
net->gsup_server_port = 0;