aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gsm_subscriber.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-06 12:03:45 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-29 18:53:28 +0200
commitd6d7affa6eb9e9e158d2e0f0108ef154e24867a5 (patch)
tree860cdcfefdd3f9b7badd414c03dee332ba03cd63 /openbsc/include/openbsc/gsm_subscriber.h
parent0759b1b9522f0a4f8256671b9098f7bc493c3a99 (diff)
sub: Remove the queue from the subscriber code
The idea of "subscriber_get_channel" was that different requests would be coordinated. At the same time we have seen that the "queue" can get stuck at both 31C3 and the rhizomatica installations. Voice calls and SMS do not need coordination. We should be able to send SMS on a voice channel and switch the MS from a SDCCH to a TCH in case we establish a voice call. The SMS code itself needs to coordinate to obey the limit of one SMS per direction but this should be enforced in the sms layer and not on the subscriber. Modify the code to have a simple paging coordination. The subscriber code will schedule the paging and register who would like to know about success/failure. This allowed to greatly simplify the paging response handling for the transaction code (and in fact we could move the transaction list into the subscriber structure now). The code gained to support to cancel the notification of a request (but not the paging itself yet). TODO: Cancel paging request in case no one cares about it anymore.
Diffstat (limited to 'openbsc/include/openbsc/gsm_subscriber.h')
-rw-r--r--openbsc/include/openbsc/gsm_subscriber.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h
index c5585ce3d..7d6c776bc 100644
--- a/openbsc/include/openbsc/gsm_subscriber.h
+++ b/openbsc/include/openbsc/gsm_subscriber.h
@@ -22,6 +22,8 @@ struct vty;
struct sgsn_mm_ctx;
struct sgsn_subscriber_data;
+struct subscr_request;
+
struct gsm_subscriber_group {
struct gsm_network *net;
@@ -66,7 +68,7 @@ struct gsm_subscriber {
struct llist_head entry;
/* pending requests */
- int in_callback;
+ int is_paging;
struct llist_head requests;
/* GPRS/SGSN related fields */
@@ -101,9 +103,6 @@ struct gsm_subscriber *subscr_get_by_id(struct gsm_subscriber_group *sgrp,
struct gsm_subscriber *subscr_get_or_create(struct gsm_subscriber_group *sgrp,
const char *imsi);
int subscr_update(struct gsm_subscriber *s, struct gsm_bts *bts, int reason);
-void subscr_put_channel(struct gsm_subscriber *subscr);
-void subscr_get_channel(struct gsm_subscriber *subscr,
- int type, gsm_cbfn *cbfn, void *param);
struct gsm_subscriber *subscr_active_by_tmsi(struct gsm_subscriber_group *sgrp,
uint32_t tmsi);
struct gsm_subscriber *subscr_active_by_imsi(struct gsm_subscriber_group *sgrp,
@@ -116,6 +115,13 @@ void subscr_update_from_db(struct gsm_subscriber *subscr);
void subscr_expire(struct gsm_subscriber_group *sgrp);
int subscr_update_expire_lu(struct gsm_subscriber *subscr, struct gsm_bts *bts);
+/*
+ * Paging handling with authentication
+ */
+struct subscr_request *subscr_request_channel(struct gsm_subscriber *subscr,
+ int type, gsm_cbfn *cbfn, void *param);
+void subscr_remove_request(struct subscr_request *req);
+
/* internal */
struct gsm_subscriber *subscr_alloc(void);
extern struct llist_head active_subscribers;