From 33f534136cfa7126e9c36bcacbb4c10a8ea7a2d0 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sun, 29 Oct 2017 02:11:18 +0100 Subject: 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 --- include/osmocom/msc/vlr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/osmocom/msc/vlr.h') diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index e9afde33d..d5306fa81 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -222,7 +222,7 @@ struct vlr_instance { bool retrieve_imeisv_ciphered; bool assign_tmsi; bool check_imei_rqd; - int auth_tuple_max_use_count; + int auth_tuple_max_reuse_count; bool auth_reuse_old_sets_on_error; bool parq_retrieve_imsi; bool is_ps; -- cgit v1.2.3