[netfilter-cvslog] r3386 - trunk/nfsim/core

rusty at netfilter.org rusty at netfilter.org
Wed Dec 15 05:45:55 CET 2004


Author: rusty at netfilter.org
Date: 2004-12-15 05:45:55 +0100 (Wed, 15 Dec 2004)
New Revision: 3386

Modified:
   trunk/nfsim/core/expect.c
Log:
expect should only exit script on -e (it originally predated -e).


Modified: trunk/nfsim/core/expect.c
===================================================================
--- trunk/nfsim/core/expect.c	2004-12-15 04:41:05 UTC (rev 3385)
+++ trunk/nfsim/core/expect.c	2004-12-15 04:45:55 UTC (rev 3386)
@@ -153,11 +153,19 @@
 		if (!streq(current_command, (*e)->command))
 			continue;
 
-		if (!(*e)->invert && !(*e)->matched)
-			script_fail("Pattern '%s' did not match",
-				    (*e)->pattern);
-		else if ((*e)->invert && (*e)->matched)
-			script_fail("Pattern '%s' matched", (*e)->pattern);
+		if (!(*e)->invert && !(*e)->matched) {
+			if (tui_abort_on_fail)
+				script_fail("Pattern '%s' did not match",
+					    (*e)->pattern);
+			nfsim_log(LOG_UI, "Pattern '%s' did not match",
+				  (*e)->pattern);
+		} else if ((*e)->invert && (*e)->matched) {
+			if (tui_abort_on_fail)
+				script_fail("Pattern '%s' matched",
+					    (*e)->pattern);
+			nfsim_log(LOG_UI, "Pattern '%s' matched",
+				  (*e)->pattern);
+		}
 
 		/* Unlink from list and free. */
 		old = *e;




More information about the netfilter-cvslog mailing list