pespin has uploaded this change for review.
layer23: Define always_search_hplmn field as bool
Change-Id: I0efc16a2362fbfec64cf6ca85bb32db8beb241a3
---
M src/host/layer23/include/osmocom/bb/common/settings.h
M src/host/layer23/include/osmocom/bb/common/subscriber.h
M src/host/layer23/src/common/subscriber.c
M src/host/layer23/src/common/vty.c
4 files changed, 16 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/96/32796/1
diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h b/src/host/layer23/include/osmocom/bb/common/settings.h
index f480aad..bae9848 100644
--- a/src/host/layer23/include/osmocom/bb/common/settings.h
+++ b/src/host/layer23/include/osmocom/bb/common/settings.h
@@ -68,7 +68,7 @@
struct osmo_plmn_id rplmn;
uint16_t lac;
bool imsi_attached;
- uint8_t always; /* ...search hplmn... */
+ bool always_search_hplmn;
};
struct gsm_settings {
diff --git a/src/host/layer23/include/osmocom/bb/common/subscriber.h b/src/host/layer23/include/osmocom/bb/common/subscriber.h
index f44401d..b829b2e 100644
--- a/src/host/layer23/include/osmocom/bb/common/subscriber.h
+++ b/src/host/layer23/include/osmocom/bb/common/subscriber.h
@@ -72,7 +72,7 @@
uint8_t t6m_hplmn; /* timer for hplmn search */
/* special things */
- uint8_t always_search_hplmn;
+ bool always_search_hplmn;
/* search hplmn in other countries also (for test cards) */
uint8_t any_timeout;
/* timer to restart 'any cell selection' */
diff --git a/src/host/layer23/src/common/subscriber.c b/src/host/layer23/src/common/subscriber.c
index 4b0ac2c..e10f40a 100644
--- a/src/host/layer23/src/common/subscriber.c
+++ b/src/host/layer23/src/common/subscriber.c
@@ -526,7 +526,7 @@
subscr->lai.lac = set->test_sim.lac;
subscr->tmsi = set->test_sim.tmsi;
subscr->ptmsi = GSM_RESERVED_TMSI;
- subscr->always_search_hplmn = set->test_sim.always;
+ subscr->always_search_hplmn = set->test_sim.always_search_hplmn;
subscr->t6m_hplmn = 1; /* try to find home network every 6 min */
OSMO_STRLCPY_ARRAY(subscr->imsi, set->test_sim.imsi);
diff --git a/src/host/layer23/src/common/vty.c b/src/host/layer23/src/common/vty.c
index ef2de24..c76f498 100644
--- a/src/host/layer23/src/common/vty.c
+++ b/src/host/layer23/src/common/vty.c
@@ -1115,10 +1115,10 @@
switch (argv[0][0]) {
case 'e':
- set->test_sim.always = 1;
+ set->test_sim.always_search_hplmn = true;
break;
case 'f':
- set->test_sim.always = 0;
+ set->test_sim.always_search_hplmn = false;
break;
}
@@ -1213,9 +1213,9 @@
} else
if (!l23_vty_hide_default)
vty_out(vty, "%s no rplmn%s", prefix, VTY_NEWLINE);
- if (!l23_vty_hide_default || set->test_sim.always)
+ if (!l23_vty_hide_default || set->test_sim.always_search_hplmn)
vty_out(vty, "%s hplmn-search %s%s", prefix,
- (set->test_sim.always) ? "everywhere" : "foreign-country",
+ set->test_sim.always_search_hplmn ? "everywhere" : "foreign-country",
VTY_NEWLINE);
return CMD_SUCCESS;
}
To view, visit change 32796. To unsubscribe, or for help writing mail filters, visit settings.