aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-10-29 02:11:18 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2017-10-31 02:02:43 +0100
commit33f534136cfa7126e9c36bcacbb4c10a8ea7a2d0 (patch)
tree8c8521cb9eabe6d670235494f41996ac20ad9aab /tests
parent96748ca790e18cb6f488d203fa223a74aa0cc56b (diff)
cosmetic: vlr: rename auth_tuple_max_use_count to _reuse_
The name auth_tuple_max_use_count suggests that if I want to use each auth tuple exactly once, I need to set it to 1. Curiously, so far you need to set to intended uses - 1. Reflect this in its name by renaming to auth_tuple_max_reuse_count. I first considered to not rename but change the if-conditions so that == 1 means each tuple is used once, and upon struct vlr allocation, set the default to 1. That would also logically entail that setting to 0 means to re-use vectors infinitely often, like now a value < 0 does. That means, when allocating a vlr struct zeroed out, we would by default have the most dangerous/unsafe configuration. It's no problem to set a default to 1 upon allocation, but by renaming the variable instead, we get safer alloc-zero behavior and don't need to change any conditionals in the code (even though the patch ends up considerably larger from all the renaming). Change-Id: I0b036cae1536d5d6fb2304f837ed1a6c3713be55
Diffstat (limited to 'tests')
-rw-r--r--tests/msc_vlr/msc_vlr_test_hlr_reject.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.c b/tests/msc_vlr/msc_vlr_test_hlr_reject.c
index 095da8172..6cf4afc42 100644
--- a/tests/msc_vlr/msc_vlr_test_hlr_reject.c
+++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.c
@@ -84,7 +84,7 @@ void test_hlr_rej_auth_info_net_fail_no_reuse_tuples()
net->authentication_required = true;
net->vlr->cfg.auth_reuse_old_sets_on_error = false;
- net->vlr->cfg.auth_tuple_max_use_count = 0;
+ net->vlr->cfg.auth_tuple_max_reuse_count = 0;
BTW("Submit a used auth tuple in the VLR");
btw("Location Update request causes a GSUP Send Auth Info request to HLR");
@@ -171,7 +171,7 @@ void test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples()
net->authentication_required = true;
net->vlr->cfg.auth_reuse_old_sets_on_error = true;
- net->vlr->cfg.auth_tuple_max_use_count = 0;
+ net->vlr->cfg.auth_tuple_max_reuse_count = 0;
BTW("Submit a used auth tuple in the VLR");
btw("Location Update request causes a GSUP Send Auth Info request to HLR");
@@ -256,7 +256,7 @@ void test_hlr_acc_but_no_auth_tuples()
net->authentication_required = true;
net->vlr->cfg.auth_reuse_old_sets_on_error = true;
- net->vlr->cfg.auth_tuple_max_use_count = 0;
+ net->vlr->cfg.auth_tuple_max_reuse_count = 0;
btw("Location Update request causes a GSUP Send Auth Info request to HLR");
lu_result_sent = RES_NONE;
@@ -291,7 +291,7 @@ void test_hlr_rej_auth_info_net_fail_reuse_tuples()
net->authentication_required = true;
net->vlr->cfg.auth_reuse_old_sets_on_error = true;
- net->vlr->cfg.auth_tuple_max_use_count = 0;
+ net->vlr->cfg.auth_tuple_max_reuse_count = 0;
BTW("Submit a used auth tuple in the VLR");
btw("Location Update request causes a GSUP Send Auth Info request to HLR");