From 70ae5d3000edd12aee38497a6f541595a8c7dee8 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 23 Nov 2012 21:33:15 +0100 Subject: 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. --- openbsc/src/libmsc/transaction.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'openbsc/src/libmsc/transaction.c') 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; +} -- cgit v1.2.3