lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/9582


Change subject: lib/BSSGP_Emulation: fix removal of items in ClientList
......................................................................

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
---
M library/BSSGP_Emulation.ttcn
1 file changed, 8 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/82/9582/1

diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index 38666b8..540413c 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 := -,
+                               llc := - };
                        return;
                }
        }

--
To view, visit https://gerrit.osmocom.org/9582
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I71103e8f8c5f18e8ebadc057cd62d85affd7ca8c
Gerrit-Change-Number: 9582
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lyn...@fe80.eu>

Reply via email to