aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2015-12-21 12:05:56 +0300
committerIvan Kluchnikov <kluchnikovi@gmail.com>2017-02-07 18:59:55 +0300
commit8bb11c90fcb333de65f5bdbbe0787ba93a1c9a82 (patch)
tree6163edbf73d96e25189113b104e851acf97a718e /openbsc/src
parent933de8cb4869be89fe213b7a287da19c858e83c9 (diff)
trans: Add new parameter message reference for SMS and function for finding transaction by this reference
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/libmsc/transaction.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/openbsc/src/libmsc/transaction.c b/openbsc/src/libmsc/transaction.c
index dba4bed17..3b10fd42a 100644
--- a/openbsc/src/libmsc/transaction.c
+++ b/openbsc/src/libmsc/transaction.c
@@ -61,6 +61,22 @@ struct gsm_trans *trans_find_by_callref(struct gsm_network *net,
return NULL;
}
+struct gsm_trans *trans_find_by_msgref(struct gsm_subscriber_connection *conn,
+ uint8_t msg_ref)
+{
+ struct gsm_trans *trans;
+ struct gsm_network *net = conn->bts->network;
+ struct gsm_subscriber *subscr = conn->subscr;
+
+ llist_for_each_entry(trans, &net->trans_list, entry) {
+ if (trans->subscr == subscr &&
+ trans->protocol == GSM48_PDISC_SMS &&
+ trans->msg_ref == msg_ref)
+ return trans;
+ }
+ return NULL;
+}
+
struct gsm_trans *trans_alloc(struct gsm_network *net,
struct gsm_subscriber *subscr,
uint8_t protocol, uint8_t trans_id,