aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_subscriber.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-07-29 23:14:15 +0200
committerHarald Welte <laforge@gnumonks.org>2009-07-29 23:14:15 +0200
commitea5cf30d155967e3cbc14847eb253bb2ae16256b (patch)
treeee1e65b0b0a8256afbb0d7f5edc002569d224279 /openbsc/src/gsm_subscriber.c
parente34e117ff15213c3d5562a4cdc6387375d22a14c (diff)
issue a signal once a subscriber is attached or detached
Diffstat (limited to 'openbsc/src/gsm_subscriber.c')
-rw-r--r--openbsc/src/gsm_subscriber.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsc/src/gsm_subscriber.c b/openbsc/src/gsm_subscriber.c
index 0bcbdf402..fe7bb6aca 100644
--- a/openbsc/src/gsm_subscriber.c
+++ b/openbsc/src/gsm_subscriber.c
@@ -32,6 +32,7 @@
#include <openbsc/paging.h>
#include <openbsc/debug.h>
#include <openbsc/paging.h>
+#include <openbsc/signal.h>
#include <openbsc/db.h>
LLIST_HEAD(active_subscribers);
@@ -170,11 +171,13 @@ int subscr_update(struct gsm_subscriber *s, struct gsm_bts *bts, int reason)
s->net = bts->network;
/* Indicate "attached to LAC" */
s->lac = bts->location_area_code;
+ dispatch_signal(SS_SUBSCR, S_SUBSCR_ATTACHED, s);
break;
case GSM_SUBSCRIBER_UPDATE_DETACHED:
/* Only detach if we are currently in this area */
if (bts->location_area_code == s->lac)
s->lac = 0;
+ dispatch_signal(SS_SUBSCR, S_SUBSCR_DETACHED, s);
break;
default:
fprintf(stderr, "subscr_update with unknown reason: %d\n",