aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-11-29 01:20:58 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-02-13 12:50:14 +0000
commitf20c6b7bd5200ed09d1563a1e61a5b62b033eeff (patch)
treeeed7ddaba870735ce4cbdd0a478d1f20416be72e
parent896950ab82729e7ef5b57057aff797519d603b7f (diff)
libmsc/gsm_04_80.c: use gsm0480_create_release_complete()
The previous implementation of msc_send_ussd_release_complete() was based on gsm0480_create_ussd_release_complete(), that doesn't allow to specify GSM 04.07 transaction identifier. The ability to specify particular transaction identifier is required for handling multiple SS/USSD transactions. Change-Id: Id2975c3383f18e83124ba38927c03980d67ddadb Depends Change-Id: (libosmocore) Ie3ac85fcef90a5e532334ba3482804d5305c88d7
-rw-r--r--include/osmocom/msc/gsm_04_80.h3
-rw-r--r--src/libmsc/gsm_04_80.c5
-rw-r--r--src/libmsc/msc_vty.c4
3 files changed, 8 insertions, 4 deletions
diff --git a/include/osmocom/msc/gsm_04_80.h b/include/osmocom/msc/gsm_04_80.h
index 29b800b..073794b 100644
--- a/include/osmocom/msc/gsm_04_80.h
+++ b/include/osmocom/msc/gsm_04_80.h
@@ -10,4 +10,5 @@ int msc_send_ussd_reject(struct ran_conn *conn,
int msc_send_ussd_notify(struct ran_conn *conn, int level,
const char *text);
-int msc_send_ussd_release_complete(struct ran_conn *conn);
+int msc_send_ussd_release_complete(struct ran_conn *conn,
+ uint8_t transaction_id);
diff --git a/src/libmsc/gsm_04_80.c b/src/libmsc/gsm_04_80.c
index 119f0e1..502848f 100644
--- a/src/libmsc/gsm_04_80.c
+++ b/src/libmsc/gsm_04_80.c
@@ -78,9 +78,10 @@ int msc_send_ussd_notify(struct ran_conn *conn, int level, const char *text)
return msc_tx_dtap(conn, msg);
}
-int msc_send_ussd_release_complete(struct ran_conn *conn)
+int msc_send_ussd_release_complete(struct ran_conn *conn,
+ uint8_t transaction_id)
{
- struct msgb *msg = gsm0480_create_ussd_release_complete();
+ struct msgb *msg = gsm0480_create_release_complete(transaction_id);
if (!msg)
return -1;
return msc_tx_dtap(conn, msg);
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index e1019a2..078b83a 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -1149,7 +1149,9 @@ DEFUN(subscriber_ussd_notify,
}
msc_send_ussd_notify(conn, level, text);
- msc_send_ussd_release_complete(conn);
+ /* FIXME: since we don't allocate a transaction here,
+ * we use dummy GSM 04.07 transaction ID. */
+ msc_send_ussd_release_complete(conn, 0x00);
vlr_subscr_put(vsub);
talloc_free(text);