make sure subscr->net is always set
since a subscriber is an element of the gsm_network, we have to ensure
subscr->net is always set correctly. We do this by using gsm_network
as an argument to all functions that resolve or create a subscriber.
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c
index 4626890..11b2ff6 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -589,7 +589,7 @@
const char *imsi = argv[0];
struct gsm_subscriber *subscr;
- subscr = subscr_get_by_imsi(imsi);
+ subscr = subscr_get_by_imsi(gsmnet, imsi);
if (!subscr) {
vty_out(vty, "%% No subscriber for IMSI %s%s",
imsi, VTY_NEWLINE);
@@ -855,7 +855,7 @@
if (argc >= 1) {
imsi = argv[0];
- subscr = subscr_get_by_imsi(imsi);
+ subscr = subscr_get_by_imsi(gsmnet, imsi);
if (!subscr) {
vty_out(vty, "%% unknown subscriber%s",
VTY_NEWLINE);