From cf0d11c4352bf13d915568a8dd335b921cda1063 Mon Sep 17 00:00:00 2001 From: paulc Date: Mon, 26 Mar 2012 00:28:33 +0000 Subject: [PATCH] Allow returning true but not setting retValue from regexroute. git-svn-id: http://voip.null.ro/svn/yate@4976 acf43c95-373e-0410-b603-e72c3f656dc1 --- modules/regexroute.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/regexroute.cpp b/modules/regexroute.cpp index 4beca2e3..7320948d 100644 --- a/modules/regexroute.cpp +++ b/modules/regexroute.cpp @@ -559,9 +559,11 @@ static bool oneContext(Message &msg, String &str, const String &context, String // special case: do nothing on empty target continue; } - else if (val == "return") { - NDebug("RegexRoute",DebugAll,"Returning false from context '%s'", context.c_str()); - return false; + else if (val.startSkip("return")) { + bool ok = val.toBoolean(); + NDebug("RegexRoute",DebugAll,"Returning %s from context '%s'", + String::boolText(ok),context.c_str()); + return ok; } else if (val.startSkip("goto") || val.startSkip("jump")) { NDebug("RegexRoute",DebugAll,"Jumping to context '%s' by rule #%u '%s'",