BSSMAP RESET: also accept conn cfm events during ST_DISC

We don't really expect connection attempts during ST_DISC, but if the user
happens to dispatch those events for whatever obscure reasons, treat them
instead of erroring about an unallowed event.

Change-Id: Ic7c60a40ff25ae647ee659259dfea769bc4592e4
diff --git a/src/osmo-bsc/bssmap_reset.c b/src/osmo-bsc/bssmap_reset.c
index 9215e90..fcf2bab 100644
--- a/src/osmo-bsc/bssmap_reset.c
+++ b/src/osmo-bsc/bssmap_reset.c
@@ -118,6 +118,17 @@
 		bssmap_reset_fsm_state_chg(fi, BSSMAP_RESET_ST_CONN);
 		break;
 
+	case BSSMAP_RESET_EV_CONN_CFM_FAILURE:
+		/* ignore */
+		break;
+
+	case BSSMAP_RESET_EV_CONN_CFM_SUCCESS:
+		/* A connection succeeded before we managed to do a RESET handshake?
+		 * Then the calling code is not taking care to check bssmap_reset_is_conn_ready().
+		 */
+		LOGPFSML(fi, LOGL_ERROR, "Connection success confirmed, but we have not seen a RESET-ACK; bug?\n");
+		break;
+
 	default:
 		OSMO_ASSERT(false);
 	}
@@ -183,6 +194,8 @@
 		     .in_event_mask = 0
 			     | S(BSSMAP_RESET_EV_RX_RESET)
 			     | S(BSSMAP_RESET_EV_RX_RESET_ACK)
+			     | S(BSSMAP_RESET_EV_CONN_CFM_FAILURE)
+			     | S(BSSMAP_RESET_EV_CONN_CFM_SUCCESS)
 			     ,
 		     .out_state_mask = 0
 			     | S(BSSMAP_RESET_ST_DISC)