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/SIP_Emulation.ttcn b/library/SIP_Emulation.ttcn
index 3957b8f..98f7371 100644
--- a/library/SIP_Emulation.ttcn
+++ b/library/SIP_Emulation.ttcn
@@ -155,7 +155,7 @@
 		}
 	}
 	setverdict(fail, "SIP Call table not found by SIP Call ID ", call_id);
-	self.stop;
+	mtc.stop;
 }
 
 /* resolve connection ID by component reference */
@@ -167,7 +167,7 @@
 		}
 	}
 	setverdict(fail, "SIP Call table not found by component ", client);
-	self.stop;
+	mtc.stop;
 }
 
 private function f_expect_table_init()
@@ -196,8 +196,7 @@
 			return;
 		}
 	}
-	setverdict(fail, "SIP Call table full");
-	self.stop;
+	testcase.stop("SIP Call table full");
 }
 
 private function f_call_table_del(CallidString call_id)
@@ -211,7 +210,7 @@
 		}
 	}
 	setverdict(fail, "SIP Call table attempt to delete non-existant ", call_id);
-	self.stop;
+	mtc.stop;
 }
 
 /* call-back type, to be provided by specific implementation; called when new call connection
@@ -270,7 +269,7 @@
 				CLIENT.send(sip_req) to vc_conn;
 			} else {
 				setverdict(fail, "SIP Request for unknown call ", call_id);
-				self.stop;
+				mtc.stop;
 			}
 			}
 		/* SIP response was received on SIP socket/port */
@@ -281,7 +280,7 @@
 				CLIENT.send(sip_resp) to vc_conn;
 			} else {
 				setverdict(fail, "SIP Response for unknown call ", call_id);
-				self.stop;
+				mtc.stop;
 			}
 			}
 
@@ -344,6 +343,7 @@
 
 	if (sip_req.requestLine.method != INVITE_E) {
 		setverdict(fail, "SIP ExpectedCreateCallback needs INVITE");
+		mtc.stop
 		return ret;
 	}
 	sip_to := sip_req.msgHeader.toField.addressField.nameAddr.addrSpec;
@@ -378,6 +378,7 @@
 	}
 
 	setverdict(fail, "Couldn't find SipExpect for incoming call ", sip_to);
+	mtc.stop
 	return ret;
 }
 
@@ -393,7 +394,7 @@
 			return;
 		}
 	}
-	setverdict(fail, "No space left in SipExpectTable");
+	testcase.stop("No space left in SipExpectTable");
 }
 
 /* client/conn_hdlr side function to use procedure port to create expect in emulation */