From e988ae471d8e699a4045d77048986570349203fa Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Tue, 27 Jan 2015 12:41:19 +0100 Subject: gprs: Don't use subscr->keep_in_ram in normal operation Currently the keep_in_ram flag is explicitely reset in gprs_subscr_cleanup to cover the case, that the VTY 'create' sub-command has been used to create the subscriber entry. This commit completely removes keep_in_ram handling from gprs_subscriber.c and adds a VTY 'destroy' sub-command to reset the flag and remove the entry. So 'create' and 'destroy' can be used to manager sticky entries that are kept even when a location cancellation is done. Added VTY command: - update-subscriber imsi IMSI destroy Sponsored-by: On-Waves ehf --- openbsc/tests/vty_test_runner.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'openbsc/tests') diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 31fadf1f8..de6a708c3 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -770,6 +770,9 @@ class TestVTYSGSN(TestVTYGenericBSC): self.assert_(res.find('Authorized: 1') >= 0) self.assertTrue(self.vty.verify('update-subscriber imsi 1234567890 cancel', [''])) res = self.vty.command('show subscriber cache') + self.assert_(res.find('1234567890') >= 0) + self.assertTrue(self.vty.verify('update-subscriber imsi 1234567890 destroy', [''])) + res = self.vty.command('show subscriber cache') self.assert_(res.find('1234567890') < 0) def add_nat_test(suite, workdir): -- cgit v1.2.3