summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-07-21 18:47:19 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2017-07-21 18:47:19 +0200
commitd93ee55ecfbf834ed71bdf830d5f1de5982d893a (patch)
treec73385e82ce0b5098dcaffeb0f0713df2a787ed7
parentbce69325220f2af7cc0746611de30225263514d9 (diff)
a-iface: move clear command to subscriber_conn.c
The clear command is currently triggered from the wrong place. This is a fixup that corrects that. However, it will introduce another problem: The clear command is not sent on detatach.
-rw-r--r--openbsc/src/libmsc/osmo_msc.c4
-rw-r--r--openbsc/src/libmsc/subscr_conn.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c
index 869ca6462..8bb7c1f4a 100644
--- a/openbsc/src/libmsc/osmo_msc.c
+++ b/openbsc/src/libmsc/osmo_msc.c
@@ -217,10 +217,6 @@ void msc_subscr_con_cleanup(struct gsm_subscriber_connection *conn)
DEBUGP(DRLL, "Freeing subscriber connection"
" with NULL subscriber\n");
- /* Clear A-Interface connection */
- if (conn->via_ran == RAN_GERAN_A)
- a_iface_tx_clear_cmd(conn);
-
if (!conn->conn_fsm)
return;
diff --git a/openbsc/src/libmsc/subscr_conn.c b/openbsc/src/libmsc/subscr_conn.c
index 9d5dd5d2c..5219944d9 100644
--- a/openbsc/src/libmsc/subscr_conn.c
+++ b/openbsc/src/libmsc/subscr_conn.c
@@ -31,6 +31,8 @@
#include <openbsc/transaction.h>
#include <openbsc/signal.h>
#include <openbsc/iu.h>
+#include <openbsc/a_iface.h>
+
#define SUBSCR_CONN_TIMEOUT 5 /* seconds */
@@ -238,6 +240,11 @@ static void subscr_conn_fsm_cleanup(struct osmo_fsm_inst *fi,
* received from the UE, or a timeout expires. For now, the log
* says "unknown UE" for each release outcome. */
+ /* Clear A-Interface connection */
+ if (conn->via_ran == RAN_GERAN_A)
+ a_iface_tx_clear_cmd(conn);
+
+
msc_subscr_conn_put(conn);
}