aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/transaction.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-11-23 21:33:15 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-12-01 11:32:47 +0100
commit70ae5d3000edd12aee38497a6f541595a8c7dee8 (patch)
tree397a109e935f59783dc1c9b82b96b93b2463a696 /openbsc/src/libmsc/transaction.c
parent6d818839a9febc5d8ff970b16822fe86f551f266 (diff)
nitb: Release the channel if there is nothing on it
This is more a work around and one still needs to implement a proper dispatch on the opening of the connection. If there is no operation left, no transaction and no silent call, close down the channel.
Diffstat (limited to 'openbsc/src/libmsc/transaction.c')
-rw-r--r--openbsc/src/libmsc/transaction.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/openbsc/src/libmsc/transaction.c b/openbsc/src/libmsc/transaction.c
index 8a181b76b..bcfb6af3f 100644
--- a/openbsc/src/libmsc/transaction.c
+++ b/openbsc/src/libmsc/transaction.c
@@ -149,3 +149,14 @@ int trans_assign_trans_id(struct gsm_subscriber *subscr,
return -1;
}
+
+int trans_has_conn(const struct gsm_subscriber_connection *conn)
+{
+ struct gsm_trans *trans;
+
+ llist_for_each_entry(trans, &conn->bts->network->trans_list, entry)
+ if (trans->conn == conn)
+ return 1;
+
+ return 0;
+}