aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-10 12:50:31 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-11-12 15:48:47 +0100
commit624e2bbb684531c02f549b381f7849b53a64172d (patch)
treeb4681f78bfdbe835f7f79320670cff0ba222f20e /openbsc/src/osmo-bsc
parentb8061adb9253611d09b63fd7f2d4229e893cc910 (diff)
move to libxsc: factor out gen of USSD notify and release complete
Both libmsc and libbsc will need distinct gsm0480_send_ussdNotify() and gsm0480_send_releaseComplete() functions, since there will be distinct subscriber connection structs. The current functions live in libmsc, so add the same in libbsc in new file gsm_04_80_utils.c. To avoid too much code dup, move the message generation part of gsm0480_send_ussdNotify() and gsm0480_send_releaseComplete() to new functions gsm0480_gen_ussdNotify() and gsm0480_gen_releaseComplete(), placed in libxsc. Change-Id: I33a84e3c28576ced91d2ea24103123431f551173
Diffstat (limited to 'openbsc/src/osmo-bsc')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_api.c4
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_ctrl.c4
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_filter.c5
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_grace.c4
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_sccp.c5
5 files changed, 12 insertions, 10 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_api.c b/openbsc/src/osmo-bsc/osmo_bsc_api.c
index d31e6c152..e7598057f 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_api.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_api.c
@@ -205,8 +205,8 @@ static void bsc_send_ussd_no_srv(struct gsm_subscriber_connection *conn,
gsm48_tx_mm_serv_ack(conn);
LOGP(DMSC, LOGL_INFO, "Sending USSD message: '%s'\n", text);
- gsm0480_send_ussdNotify(conn, 1, text);
- gsm0480_send_releaseComplete(conn);
+ bsc_gsm0480_send_ussdNotify(conn, 1, text);
+ bsc_gsm0480_send_releaseComplete(conn);
}
/*
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
index 3010b5591..84b7b92b9 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
@@ -598,8 +598,8 @@ static int set_net_ussd_notify(struct ctrl_cmd *cmd, void *data)
* the release complete when we get a returnResultLast
* for this invoke id.
*/
- gsm0480_send_releaseComplete(conn);
- gsm0480_send_ussdNotify(conn, alert, text_str);
+ bsc_gsm0480_send_releaseComplete(conn);
+ bsc_gsm0480_send_ussdNotify(conn, alert, text_str);
cmd->reply = "Found a connection";
break;
}
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c
index 14e0b7144..8fc899ed1 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c
@@ -246,8 +246,9 @@ static int send_welcome_ussd(struct gsm_subscriber_connection *conn)
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);
+ bsc_gsm0480_send_ussdNotify(conn, 1,
+ conn->sccp_con->msc->ussd_welcome_txt);
+ bsc_gsm0480_send_releaseComplete(conn);
return 0;
}
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_grace.c b/openbsc/src/osmo-bsc/osmo_bsc_grace.c
index e6194aba5..c1d7c6aab 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_grace.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_grace.c
@@ -112,8 +112,8 @@ static int handle_sub(struct gsm_lchan *lchan, const char *text)
if (lchan->state != LCHAN_S_ACTIVE)
return -1;
- gsm0480_send_ussdNotify(conn, 0, text);
- gsm0480_send_releaseComplete(conn);
+ bsc_gsm0480_send_ussdNotify(conn, 0, text);
+ bsc_gsm0480_send_releaseComplete(conn);
return 0;
}
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
index 86b27be72..fa060da66 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
@@ -285,8 +285,9 @@ static void bsc_notify_msc_lost(struct osmo_bsc_sccp_con *con)
return;
/* send USSD notification */
- gsm0480_send_ussdNotify(conn, 1, conn->sccp_con->msc->ussd_msc_lost_txt);
- gsm0480_send_releaseComplete(conn);
+ bsc_gsm0480_send_ussdNotify(conn, 1,
+ conn->sccp_con->msc->ussd_msc_lost_txt);
+ bsc_gsm0480_send_releaseComplete(conn);
}
static void bsc_notify_and_close_conns(struct bsc_msc_connection *msc_con)