properly receive BSSMAP Clear Complete and Iu Release Complete

When sending a BSSMAP Clear or Iu Release, do not immediately discard the conn,
but wait until a BSSMAP Clear Complete / Iu Release Complete has been received.

Hence we will no longer show in the log that an incoming Release/Clear Complete
belongs to an unknown subscriber, but will still be around to properly log the
release.

Related: OS#3122
Change-Id: Ie4c6aaba3866d6e5b98004e8870a215e8cf8ffc1
diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.c b/tests/msc_vlr/msc_vlr_test_hlr_reject.c
index 8532f8e..8dfe1f4 100644
--- a/tests/msc_vlr/msc_vlr_test_hlr_reject.c
+++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.c
@@ -44,6 +44,7 @@
 	VERBOSE_ASSERT(lu_result_sent, == RES_REJECT, "%d");
 	VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
 
+	bss_sends_clear_complete();
 	EXPECT_CONN_COUNT(0);
 	clear_vlr();
 	comment_end();
@@ -70,6 +71,7 @@
 	VERBOSE_ASSERT(lu_result_sent, == RES_REJECT, "%d");
 	VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
 
+	bss_sends_clear_complete();
 	EXPECT_CONN_COUNT(0);
 	clear_vlr();
 	comment_end();
@@ -128,6 +130,7 @@
 
 	btw("LU was successful, and the conn has already been closed");
 	VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
+	bss_sends_clear_complete();
 	EXPECT_CONN_COUNT(0);
 
 
@@ -157,6 +160,7 @@
 	VERBOSE_ASSERT(lu_result_sent, == RES_REJECT, "%d");
 	VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
 
+	bss_sends_clear_complete();
 	EXPECT_CONN_COUNT(0);
 	clear_vlr();
 	comment_end();
@@ -215,6 +219,7 @@
 
 	btw("LU was successful, and the conn has already been closed");
 	VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
+	bss_sends_clear_complete();
 	EXPECT_CONN_COUNT(0);
 
 
@@ -245,6 +250,7 @@
 	VERBOSE_ASSERT(lu_result_sent, == RES_REJECT, "%d");
 	VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
 
+	bss_sends_clear_complete();
 	EXPECT_CONN_COUNT(0);
 	clear_vlr();
 	comment_end();
@@ -277,6 +283,7 @@
 	VERBOSE_ASSERT(lu_result_sent, == RES_REJECT, "%d");
 	VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
 
+	bss_sends_clear_complete();
 	EXPECT_CONN_COUNT(0);
 	clear_vlr();
 	comment_end();
@@ -335,6 +342,7 @@
 
 	btw("LU was successful, and the conn has already been closed");
 	VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
+	bss_sends_clear_complete();
 	EXPECT_CONN_COUNT(0);
 
 
@@ -379,6 +387,7 @@
 
 	btw("LU was successful, and the conn has already been closed");
 	VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
+	bss_sends_clear_complete();
 	EXPECT_CONN_COUNT(0);
 
 	clear_vlr();
@@ -402,6 +411,7 @@
 		NULL);
 	VERBOSE_ASSERT(lu_result_sent, == RES_REJECT, "%d");
 	VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
+	bss_sends_clear_complete();
 	EXPECT_CONN_COUNT(0);
 
 	clear_vlr();
@@ -429,6 +439,7 @@
 	btw("LU was successful, and the conn has already been closed");
 	VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
 
+	bss_sends_clear_complete();
 	EXPECT_CONN_COUNT(0);
 	clear_vlr();
 	comment_end();