bsc_api: Operate on the subscriber connection for subscriber management

This commit is contained in:
Holger Hans Peter Freyther 2010-06-16 14:02:41 +08:00
parent 9ce1b27fbf
commit bddd152049
3 changed files with 6 additions and 7 deletions

View File

@ -82,7 +82,7 @@ struct gsm_subscriber *subscr_get_by_extension(struct gsm_network *net,
struct gsm_subscriber *subscr_get_by_id(struct gsm_network *net,
unsigned long long id);
int subscr_update(struct gsm_subscriber *s, struct gsm_bts *bts, int reason);
void subscr_put_channel(struct gsm_lchan *lchan);
void subscr_put_channel(struct gsm_subscriber_connection *conn);
void subscr_get_channel(struct gsm_subscriber *subscr,
int type, gsm_cbfn *cbfn, void *param);

View File

@ -124,10 +124,10 @@ void sms_free(struct gsm_sms *sms)
*/
static void gsm411_release_conn(struct gsm_subscriber_connection *conn)
{
if (!conn->lchan)
if (!conn)
return;
subscr_put_channel(conn->lchan);
subscr_put_channel(conn);
}
struct msgb *gsm411_msgb_alloc(void)

View File

@ -185,9 +185,8 @@ void subscr_get_channel(struct gsm_subscriber *subscr,
}
}
void subscr_put_channel(struct gsm_lchan *lchan)
void subscr_put_channel(struct gsm_subscriber_connection *conn)
{
struct gsm_subscriber_connection *conn = &lchan->conn;
/*
* FIXME: Continue with other requests now... by checking
* the gsm_subscriber inside the gsm_lchan. Drop the ref count
@ -208,7 +207,7 @@ void subscr_put_channel(struct gsm_lchan *lchan)
put_subscr_con(conn);
if (lchan->conn.subscr && !llist_empty(&lchan->conn.subscr->requests))
subscr_send_paging_request(lchan->conn.subscr);
if (conn->subscr && !llist_empty(&conn->subscr->requests))
subscr_send_paging_request(conn->subscr);
}