aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-03 23:19:40 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-16 15:32:33 +0100
commit1983131cdc3a9b02fb38de497c5d896b08e771af (patch)
treefb8949716d39f0b33581b037494db583702ce387
parent6bd5d09507a5f8d28f93c43d1221152fd4e6bde9 (diff)
msc: 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.err4
-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, 57 insertions, 56 deletions
diff --git a/openbsc/include/openbsc/osmo_msc.h b/openbsc/include/openbsc/osmo_msc.h
index 1dd83220a..8bdb62300 100644
--- a/openbsc/include/openbsc/osmo_msc.h
+++ b/openbsc/include/openbsc/osmo_msc.h
@@ -74,6 +74,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_close_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 02e6fa1d2..8ab68478e 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -406,7 +406,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,
@@ -672,7 +672,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 6ce837b8a..e7976f5ad 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 3589139bf..a33017ffc 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_test_gsm_authen.err
+++ b/openbsc/tests/msc_vlr/msc_vlr_test_gsm_authen.err
@@ -393,7 +393,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -977,7 +977,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -1177,7 +1177,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -1405,7 +1405,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -1783,7 +1783,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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 959df09a4..821e5892d 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
+++ b/openbsc/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
@@ -427,7 +427,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -893,7 +893,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -1093,7 +1093,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -1291,7 +1291,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -1519,7 +1519,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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 a6c2d828c..53fffa5a9 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 03491692c..e012de972 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 f82aa7a8d..9a2939614 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
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 e12c19855..eb8f0ef02 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_test_no_authen.err
+++ b/openbsc/tests/msc_vlr/msc_vlr_test_no_authen.err
@@ -276,7 +276,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -729,7 +729,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -885,7 +885,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -1063,7 +1063,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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 830c83197..4d69f687c 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 b2ca91d41..0797b45df 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
@@ -303,7 +303,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -439,7 +439,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 19c260384..712f222e5 100644
--- a/openbsc/tests/msc_vlr/msc_vlr_test_umts_authen.err
+++ b/openbsc/tests/msc_vlr/msc_vlr_test_umts_authen.err
@@ -377,7 +377,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -758,7 +758,7 @@ DRLL Freeing subscriber connection with NULL subscriber
===== 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
@@ -925,7 +925,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
@@ -1092,7 +1092,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 d8eada180..7a9e2d8bb 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;