a_reset: cleanup + remove dead code

a_reset.c/h was originally developed to be used in both, bsc and
msc without changes. Unfortunately no suitable library has been
found for a_reset.c/h so the file ended up as duplicated code in
both split brances. Eventually we decided to specialize the
generalized code again, which means some of the functions needed
only by osmo-bsc are removed.

- Remove dead code
- Fix timer identification number (T16)
- use fi->priv to hold context info
- Minor cosmetic fixes

Change-Id: I8e489eb494d358d130e51cb2167929edeaa12e92
Depends: libosmocore I36d221c973d3890721ef1d376fb9be82c4311378
Related: OS#3103
diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c
index 6d5848a..1ace43d 100644
--- a/src/libmsc/a_iface_bssap.c
+++ b/src/libmsc/a_iface_bssap.c
@@ -114,12 +114,12 @@
 	/* Make sure all orphand subscriber connections will be cleard */
 	a_clear_all(scu, &a_conn_info->bsc->bsc_addr);
 
-	if (!a_conn_info->bsc->reset)
+	if (!a_conn_info->bsc->reset_fsm)
 		a_start_reset(a_conn_info->bsc, true);
 
 	/* Treat an incoming RESET like an ACK to any RESET request we may have just sent.
 	 * After all, what we wanted is the A interface to be reset, which we now know has happened. */
-	a_reset_ack_confirm(a_conn_info->bsc->reset);
+	a_reset_ack_confirm(a_conn_info->bsc->reset_fsm);
 }
 
 /* Endpoint to handle BSSMAP reset acknowlegement */
@@ -133,7 +133,7 @@
 	ss7 = osmo_ss7_instance_find(network->a.cs7_instance);
 	OSMO_ASSERT(ss7);
 
-	if (a_conn_info->bsc->reset == NULL) {
+	if (a_conn_info->bsc->reset_fsm == NULL) {
 		LOGP(DBSSAP, LOGL_ERROR, "Received RESET ACK from an unknown BSC %s, ignoring...\n",
 		     osmo_sccp_addr_name(ss7, &a_conn_info->bsc->bsc_addr));
 		return;
@@ -144,7 +144,7 @@
 
 	/* Confirm that we managed to get the reset ack message
 	 * towards the connection reset logic */
-	a_reset_ack_confirm(a_conn_info->bsc->reset);
+	a_reset_ack_confirm(a_conn_info->bsc->reset_fsm);
 }
 
 /* Handle UNITDATA BSSMAP messages */