diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-05-21 11:07:53 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-05-28 12:29:40 +0200 |
commit | 7b9f825ae8f8a39c072413820a1a0557f420499d (patch) | |
tree | 7f989065bba29d68101ea0f1242830eff0ddf0d5 /tests/tbf/TbfTest.cpp | |
parent | b0e5eaf59adbefc44e01850a6784c9da0c3abbf9 (diff) |
ms: Use the IMSI to retrieve the MS object
This commit extends get_ms() to really compare the IMSI if it has
been given. Matching by TLLI has a higher precedence than matching by
IMSI.
Ticket: #1674
Sponsored-by: On-Waves ehf
Diffstat (limited to 'tests/tbf/TbfTest.cpp')
-rw-r--r-- | tests/tbf/TbfTest.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index bc783176..b0106caf 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -327,28 +327,28 @@ static void test_tbf_imsi() dl_tbf[0]->assign_imsi("001001000000001"); ms1 = the_bts.ms_store().get_ms(0, 0, "001001000000001"); - /* OSMO_ASSERT(ms1 != NULL); */ + OSMO_ASSERT(ms1 != NULL); ms2 = the_bts.ms_store().get_ms(0xf1000001); OSMO_ASSERT(ms2 != NULL); OSMO_ASSERT(strcmp(ms2->imsi(), "001001000000001") == 0); - /* OSMO_ASSERT(ms1 == ms2); */ + OSMO_ASSERT(ms1 == ms2); /* change the IMSI on TBF 0 */ dl_tbf[0]->assign_imsi("001001000000002"); ms1 = the_bts.ms_store().get_ms(0, 0, "001001000000001"); OSMO_ASSERT(ms1 == NULL); ms1 = the_bts.ms_store().get_ms(0, 0, "001001000000002"); - /* OSMO_ASSERT(ms1 != NULL); */ + OSMO_ASSERT(ms1 != NULL); OSMO_ASSERT(strcmp(ms2->imsi(), "001001000000002") == 0); - /* OSMO_ASSERT(ms1 == ms2); */ + OSMO_ASSERT(ms1 == ms2); /* use the same IMSI on TBF 2 */ dl_tbf[1]->assign_imsi("001001000000002"); ms1 = the_bts.ms_store().get_ms(0, 0, "001001000000002"); - /* OSMO_ASSERT(ms1 != NULL); */ + OSMO_ASSERT(ms1 != NULL); OSMO_ASSERT(ms1 != ms2); - /* OSMO_ASSERT(strcmp(ms1->imsi(), "001001000000002") == 0); */ - /* OSMO_ASSERT(strcmp(ms2->imsi(), "") == 0); */ + OSMO_ASSERT(strcmp(ms1->imsi(), "001001000000002") == 0); + OSMO_ASSERT(strcmp(ms2->imsi(), "") == 0); tbf_free(dl_tbf[1]); ms1 = the_bts.ms_store().get_ms(0, 0, "001001000000002"); |