diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-12-03 15:32:54 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-12-03 15:32:54 +0100 |
commit | d2361d970af8fe5d624ed3977982c21c327ac986 (patch) | |
tree | e1db89ddfc673219c74dbbf565ae9eefe0f35b25 /openbsc/src/osmo-bsc/osmo_bsc_filter.c | |
parent | f589221ed0a00c12fce0fac629475851b2680b77 (diff) |
bsc: Send the USSD message after the location updating accept.
Make sure to accept the phone first before sending the USSD message.
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_filter.c')
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_filter.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c index 3b657b320..957ceaf95 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c @@ -225,23 +225,30 @@ int bsc_scan_bts_msg(struct gsm_subscriber_connection *conn, struct msgb *msg) return 0; } -static void send_welcome_ussd(struct gsm_subscriber_connection *conn) +static int send_welcome_ussd(struct gsm_subscriber_connection *conn) { struct osmo_bsc_sccp_con *bsc_con; bsc_con = conn->sccp_con; if (!bsc_con) { LOGP(DMSC, LOGL_DEBUG, "No SCCP connection associated.\n"); - return; + return 0; } if (!bsc_con->msc->ussd_welcome_txt) { LOGP(DMSC, LOGL_DEBUG, "No USSD Welcome text defined.\n"); - return; + return 0; } - gsm0480_send_ussdNotify(conn, 1, bsc_con->msc->ussd_welcome_txt); + return BSS_SEND_USSD; +} + +int bsc_send_welcome_ussd(struct gsm_subscriber_connection *conn) +{ + gsm0480_send_ussdNotify(conn, 1, conn->sccp_con->msc->ussd_welcome_txt); gsm0480_send_releaseComplete(conn); + + return 0; } /** @@ -276,7 +283,8 @@ int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg) } if (conn->sccp_con->new_subscriber) - send_welcome_ussd(conn); + return send_welcome_ussd(conn); + return 0; } return 0; |