This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.
Holger Freyther zecke at selfish.orgFrom 890b5c3c519dcbbcb140284b1e68b22b8ae71532 Mon Sep 17 00:00:00 2001 From: Holger Freyther <ich at tamarin.(none)> Date: Tue, 31 Mar 2009 04:35:19 +0200 Subject: [PATCH] Proposal for a "channel request" interface... Reuqests for a subscriber a stored within the gsm_subscriber datastructure and it will keep track how many channels are allocated for this user and of which type to decide on policy... e.g. attempt to submit SMS during a phone call and not doing paging but a simple (immediate) assignment of the channel... --- include/openbsc/gsm_subscriber.h | 5 +++++ src/gsm_04_08.c | 2 +- src/gsm_subscriber.c | 12 ++++++++++++ 3 files changed, 18 insertions(+), 1 deletions(-) diff --git a/include/openbsc/gsm_subscriber.h b/include/openbsc/gsm_subscriber.h index 7da896e..52c2c66 100644 --- a/include/openbsc/gsm_subscriber.h +++ b/include/openbsc/gsm_subscriber.h @@ -24,6 +24,9 @@ struct gsm_subscriber { int use_count; struct llist_head entry; struct gsm_bts *current_bts; + + /* pending requests */ + struct llist_head requests; }; enum gsm_subscriber_field { @@ -44,6 +47,8 @@ struct gsm_subscriber *subscr_get_by_imsi(const char *imsi); struct gsm_subscriber *subscr_get_by_extension(const char *ext); int subscr_update(struct gsm_subscriber *s, struct gsm_bts *bts, int reason); void subscr_put_channel(struct gsm_lchan *lchan); +void subscr_get_channel(struct gsm_subscriber *subscr, int type, + gsm_cbfn *cbfn, void *data); /* internal */ struct gsm_subscriber *subscr_alloc(void); diff --git a/src/gsm_04_08.c b/src/gsm_04_08.c index 85af502..7a941b9 100644 --- a/src/gsm_04_08.c +++ b/src/gsm_04_08.c @@ -1098,7 +1098,7 @@ static int gsm48_cc_rx_setup(struct msgb *msg) call->called_subscr = called_subscr; /* start paging of the receiving end of the call */ - paging_request(msg->trx->bts, called_subscr, RSL_CHANNEED_TCH_F, + subscr_get_channel(called_subscr, RSL_CHANNEED_TCH_F, setup_trig_pag_evt, call); /* send a CALL PROCEEDING message to the MO */ diff --git a/src/gsm_subscriber.c b/src/gsm_subscriber.c index 0c2dd7c..bfb4983 100644 --- a/src/gsm_subscriber.c +++ b/src/gsm_subscriber.c @@ -44,6 +44,8 @@ struct gsm_subscriber *subscr_alloc(void) llist_add_tail(&s->entry, &active_subscribers); s->use_count = 1; + INIT_LLIST_HEAD(&s->requests); + return s; } @@ -123,6 +125,16 @@ struct gsm_subscriber *subscr_put(struct gsm_subscriber *subscr) return NULL; } +void subscr_get_channel(struct gsm_subscriber *subscr, int type, + gsm_cbfn *cbfn, void *data) +{ + /* current_bts is the current VLR of the MobileStation */ + if (!subscr->current_bts) + return; + + paging_request(subscr->current_bts, subscr, type, cbfn, data); +} + void subscr_put_channel(struct gsm_lchan *lchan) { /* -- 1.6.0.4