mncc_sock: Clear all calls if MNCC application (LCR) disconnects
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index 634eed3..4ab61ba 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -329,6 +329,18 @@
 	}
 }
 
+void gsm0408_clear_all_trans(struct gsm_network *net, int protocol)
+{
+	struct gsm_trans *trans, *temp;
+
+	LOGP(DCC, LOGL_NOTICE, "Clearing all currently active transactions!!!\n");
+
+	llist_for_each_entry_safe(trans, temp, &net->trans_list, entry) {
+		if (trans->protocol == protocol)
+			trans_free(trans);
+	}
+}
+
 /* Chapter 9.2.14 : Send LOCATION UPDATING REJECT */
 int gsm0408_loc_upd_rej(struct gsm_subscriber_connection *conn, u_int8_t cause)
 {