lib/BSSGP_Emulation: fix removal of items in ClientList
Previous the old entries aren't removed. This only had an
impact if two different f_TC_* were using the same imsi.
When the second function tried to remove the Client again from
the ClientList, the BSSGP_Emulation failed.
Change-Id: I71103e8f8c5f18e8ebadc057cd62d85affd7ca8c
diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index 38666b8..f51d539 100644
--- a/library/BSSGP_Emulation.ttcn
+++ b/library/BSSGP_Emulation.ttcn
@@ -297,12 +297,18 @@
for (i := 0; i < sizeof(ClientTable); i := i+1) {
if (isvalue(ClientTable[i].imsi) and ClientTable[i].imsi == imsi) {
if (ClientTable[i].comp_ref != vc_conn) {
- setverdict(fail, "Cannot unregister IMSI ", imsi, " registred to ",
+ setverdict(fail, "Cannot unregister index=", i, " IMSI ", imsi, " registred to ",
ClientTable[i].comp_ref, " from ", vc_conn);
self.stop;
}
log("Removing Client IMSI=", imsi, ", index=", i);
- ClientTable[i] := { -, omit, -, -, - };
+ ClientTable[i] := {
+ tlli := -,
+ tlli_old := omit,
+ imsi := ''H,
+ cell_id := -,
+ comp_ref := null,
+ llc := - };
return;
}
}