aboutsummaryrefslogtreecommitdiffstats
path: root/src/hlr_vty_subscr.c
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-04-09 11:39:16 +0200
committerStefan Sperling <ssperling@sysmocom.de>2018-04-10 07:57:49 +0200
commitf162252a087c29104cab4e1f2bdf609b3362aaa6 (patch)
tree69dabb5ae47a94068680393b813665e2d61ad8b2 /src/hlr_vty_subscr.c
parent8f8401453cde2369c10a39e665abf566d4de1a81 (diff)
notify GSUP clients when HLR subscriber information changes
Add a function which triggers subscriber update notifications to all connected GSUP clients, and invoke it when the MSISDN of a subscriber is changed via VTY. This makes the TTCN3 HLR test TC_vty_msisdn_isd pass. Note that the new function currently relies on implementation details of the Location Update Operation (luop) code. Because of this we currently log a slightly misleading message when the updated Insert Subscriber Data message is sent: "luop.c:161 LU OP state change: LU RECEIVED -> ISD SENT" This message is misleading because, in fact, no location update message was received from a GSUP client at that moment. So while this change fixes the externally visible behaviour, we may want to follow this up with some refactoring to avoid relying on luop internals. It seems acceptable to do that in a separate step since such a change will be more involved and harder to review. We may want to trigger such notifications in other situations as well. This is left for future work, too. There are no TTCN3 test cases for other situations yet, as far as I can see. Related: OS#2785 Change-Id: Iffe1d7afb9fc7dbae542f70bbf5391ddc08a14b4
Diffstat (limited to 'src/hlr_vty_subscr.c')
-rw-r--r--src/hlr_vty_subscr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c
index 7191a1c..4092a8f 100644
--- a/src/hlr_vty_subscr.c
+++ b/src/hlr_vty_subscr.c
@@ -257,6 +257,10 @@ DEFUN(subscriber_msisdn,
vty_out(vty, "%% Updated subscriber IMSI='%s' to MSISDN='%s'%s",
subscr.imsi, msisdn, VTY_NEWLINE);
+
+ if (db_subscr_get_by_msisdn(g_hlr->dbc, msisdn, &subscr) == 0)
+ osmo_hlr_subscriber_update_notify(&subscr);
+
return CMD_SUCCESS;
}