library: Ensure setverdict(fail) is followed by mtc.stop

This will prevent subsequent failures from overwriting the verdict so we
can easily see the root cause of the test failure.

Using testcase.stop instead for errors internal to our test
infrastructure to mark them as test errors instead of failed.

Change-Id: Idc6819aaf0b01e70c38fad828dd44dcec6bdd778
diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn
index 475b478..71cd8db 100644
--- a/library/RTP_Emulation.ttcn
+++ b/library/RTP_Emulation.ttcn
@@ -303,7 +303,7 @@
 								g_local_port, {udp:={}});
 			if (not ispresent(res.connId)) {
 				setverdict(fail, "Could not listen on RTP socket, check your configuration");
-				self.stop;
+				mtc.stop;
 			}
 			g_rtp_conn_id := res.connId;
 			tr_rtp.connId := g_rtp_conn_id;
@@ -311,7 +311,7 @@
 								g_local_port+1, {udp:={}});
 			if (not ispresent(res.connId)) {
 				setverdict(fail, "Could not listen on RTCP socket, check your configuration");
-				self.stop;
+				mtc.stop;
 			}
 			g_rtcp_conn_id := res.connId;
 			tr_rtcp.connId := g_rtcp_conn_id;
@@ -329,7 +329,7 @@
 								g_rtp_conn_id, {udp:={}});
 			if (not ispresent(res.connId)) {
 				setverdict(fail, "Could not connect to RTP socket, check your configuration");
-				self.stop;
+				mtc.stop;
 			}
 			res := RTP_CodecPort_CtrlFunct.f_IPL4_connect(RTCP, g_remote_host,
 								g_remote_port+1,
@@ -337,7 +337,7 @@
 								g_rtcp_conn_id, {udp:={}});
 			if (not ispresent(res.connId)) {
 				setverdict(fail, "Could not connect to RTCP socket, check your configuration");
-				self.stop;
+				mtc.stop;
 			}
 			CTRL.reply(RTPEM_connect:{g_remote_host, g_remote_port});
 		}
@@ -426,9 +426,11 @@
 		/* fail on any unexpected messages */
 		[] RTP.receive {
 			setverdict(fail, "Received unexpected type from RTP");
+			mtc.stop;
 		}
 		[] RTCP.receive {
 			setverdict(fail, "Received unexpected type from RTCP");
+			mtc.stop;
 		}
 	}
 	}