ASCI: Clear VGCS call and channel on BSSMAP reset message

When sending or receiving BSSMAP reset msg, the ongoing VGCS/VBS SCCP
connections are cleared. E.g. this happens if the BSC is restarted and
there is an ongoing VGCS/VBS call at this BSC.

Change-Id: Ib0b309150b82148098d05cfb1fb18767283e654e
Related: OS#4854
diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c
index 880619d..8604443 100644
--- a/src/libmsc/ran_peer.c
+++ b/src/libmsc/ran_peer.c
@@ -119,7 +119,12 @@
 	struct ran_conn *conn, *next;
 
 	ran_peer_for_each_ran_conn_safe(conn, next, rp) {
-		ran_conn_discard(conn);
+		/* Tell VGCS FSM that the connections have been cleared. */
+		if (conn->vgcs.bss)
+			vgcs_vbs_clear_cpl(conn->vgcs.bss, NULL);
+		else if (conn->vgcs.cell)
+			vgcs_vbs_clear_cpl_channel(conn->vgcs.cell, NULL);
+		else ran_conn_discard(conn);
 	}
 }