This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.orgPau Espin Pedrol has submitted this change and it was merged.
Change subject: resource: next_lac: Avoid using LAC 0
......................................................................
resource: next_lac: Avoid using LAC 0
Change-Id: I6c1bef81040e2c6210177f04743e7acf3eb9ad8f
---
M src/osmo_gsm_tester/resource.py
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Neels Hofmeyr: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index 746aae0..8412d6a 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -211,7 +211,8 @@
return self.next_persistent_value('msisdn', '1000', schema.msisdn, util.msisdn_inc, origin)
def next_lac(self, origin):
- return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin)
+ # LAC=0 has special meaning (MS detached), avoid it
+ return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str(((int(x)+1) % pow(2,16)) or 1), origin)
def next_cellid(self, origin):
return self.next_persistent_value('cellid', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin)
--
To view, visit https://gerrit.osmocom.org/5066
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6c1bef81040e2c6210177f04743e7acf3eb9ad8f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>