diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-16 13:23:55 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-16 15:42:38 +0800 |
commit | b2be195b501d8327a493f93bc9fba41f8a699ba4 (patch) | |
tree | fb27e7bf7c080946cfbc38b3beea7e90c50e2fcb /openbsc/src/gsm_04_11.c | |
parent | ea01ca764fcf0912ac2ccd1a8818640518911a51 (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/gsm_04_11.c')
-rw-r--r-- | openbsc/src/gsm_04_11.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/openbsc/src/gsm_04_11.c b/openbsc/src/gsm_04_11.c index 4488f8d6c..9d6533383 100644 --- a/openbsc/src/gsm_04_11.c +++ b/openbsc/src/gsm_04_11.c @@ -1143,14 +1143,14 @@ static int paging_cb_send_sms(unsigned int hooknum, unsigned int event, int gsm411_send_sms_subscr(struct gsm_subscriber *subscr, struct gsm_sms *sms) { - struct gsm_lchan *lchan; + struct gsm_subscriber_connection *conn; /* check if we already have an open lchan to the subscriber. * if yes, send the SMS this way */ - lchan = lchan_for_subscr(subscr); - if (lchan) { - use_subscr_con(&lchan->conn); - return gsm411_send_sms_lchan(&lchan->conn, sms); + conn = connection_for_subscr(subscr); + if (conn) { + use_subscr_con(conn); + return gsm411_send_sms_lchan(conn, sms); } /* if not, we have to start paging */ @@ -1162,7 +1162,7 @@ static int subscr_sig_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) { struct gsm_subscriber *subscr; - struct gsm_lchan *lchan; + struct gsm_subscriber_connection *conn; struct gsm_sms *sms; switch (signal) { @@ -1170,14 +1170,14 @@ static int subscr_sig_cb(unsigned int subsys, unsigned int signal, /* A subscriber has attached. Check if there are * any pending SMS for him to be delivered */ subscr = signal_data; - lchan = lchan_for_subscr(subscr); - if (!lchan) + conn = connection_for_subscr(subscr); + if (!conn) break; sms = db_sms_get_unsent_for_subscr(subscr); if (!sms) break; - use_subscr_con(&lchan->conn); - gsm411_send_sms_lchan(&lchan->conn, sms); + use_subscr_con(conn); + gsm411_send_sms_lchan(conn, sms); break; default: break; |