aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/token_auth.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-06-16 13:23:55 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-16 15:42:38 +0800
commitb2be195b501d8327a493f93bc9fba41f8a699ba4 (patch)
treefb27e7bf7c080946cfbc38b3beea7e90c50e2fcb /openbsc/src/token_auth.c
parentea01ca764fcf0912ac2ccd1a8818640518911a51 (diff)
bsc_api: Rename lchan_for_subscr to connection_for_subscr and update code
With handover and late/early assignment there might be two channels for one subscriber and only the BSC knows which one to use, so use the gsm_subscriber_connection everywhere...
Diffstat (limited to 'openbsc/src/token_auth.c')
-rw-r--r--openbsc/src/token_auth.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/openbsc/src/token_auth.c b/openbsc/src/token_auth.c
index 2608c6668..dc8cce251 100644
--- a/openbsc/src/token_auth.c
+++ b/openbsc/src/token_auth.c
@@ -99,12 +99,12 @@ unauth:
subscr->authorized = 0;
db_sync_subscriber(subscr);
if (rc) {
- struct gsm_lchan *lchan = lchan_for_subscr(subscr);
- if (lchan) {
+ struct gsm_subscriber_connection *conn = connection_for_subscr(subscr);
+ if (conn) {
u_int8_t auth_rand[16];
/* kick the subscriber off the network */
- gsm48_tx_mm_auth_req(&lchan->conn, auth_rand, 0);
- gsm48_tx_mm_auth_rej(&lchan->conn);
+ gsm48_tx_mm_auth_req(conn, auth_rand, 0);
+ gsm48_tx_mm_auth_rej(conn);
/* FIXME: close the channel early ?*/
//gsm48_send_rr_Release(lchan);
}
@@ -118,7 +118,7 @@ static int token_sms_cb(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data)
{
struct gsm_sms *sms = signal_data;
- struct gsm_lchan *lchan;
+ struct gsm_subscriber_connection *conn;
u_int8_t auth_rand[16];
@@ -136,11 +136,11 @@ static int token_sms_cb(unsigned int subsys, unsigned int signal,
return 0;
- lchan = lchan_for_subscr(sms->receiver);
- if (lchan) {
+ conn = connection_for_subscr(sms->receiver);
+ if (conn) {
/* kick the subscriber off the network */
- gsm48_tx_mm_auth_req(&lchan->conn, auth_rand, 0);
- gsm48_tx_mm_auth_rej(&lchan->conn);
+ gsm48_tx_mm_auth_req(conn, auth_rand, 0);
+ gsm48_tx_mm_auth_rej(conn);
/* FIXME: close the channel early ?*/
//gsm48_send_rr_Release(lchan);
}