MATCHING_PROBLEM switch is used instead of MATHING_TIMEOUT for logging
Summary
Warning for timeout operation on not-started timers is managed by the MATCHING_PROBLEM bit instead of the MATCHING_TIMEOUT, as specified in Reference Guide.
Steps and/or TTCN-3 code to reproduce
ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING_??? (all except MATCHING_TIMEOUT)
timer t := 1.0;
t.timeout;
Log contains warning about using of not-started timer.
What is the current bug behavior?
Usage of timeout for not-started timer looks like a possible operation. At least it is not forbidden in the specification. Titan produces warning in this case. According to the specification, removing of MATCHING_TIMEOUT from log mask should deactivate this warning, but it doesn't happens. Instead of MATCHING_TIMEOUT, MATCHING_PROBLEM flag deactivate it.
What is the expected correct behavior?
Use MATCHING_TIMEOUT instead of MATCHING_PROBLEM to deactivate warning.
Possible fixes
diff --git a/core/LoggerPluginManager.cc b/core/LoggerPluginManager.cc
index 21e6c7ef9..96d705397 100644
--- a/core/LoggerPluginManager.cc
+++ b/core/LoggerPluginManager.cc
@@ -1235,10 +1235,10 @@ void LoggerPluginManager::log_matching_failure(int port_type, const char *port_n
void LoggerPluginManager::log_matching_timeout(const char *timer_name)
{
- if (!TTCN_Logger::log_this_event(TTCN_Logger::MATCHING_PROBLEM) && (TTCN_Logger::get_emergency_logging()<=0))
+ if (!TTCN_Logger::log_this_event(TTCN_Logger::MATCHING_TIMEOUT) && (TTCN_Logger::get_emergency_logging()<=0))
return;
API::TitanLogEvent event;
- fill_common_fields(event, TTCN_Logger::MATCHING_PROBLEM);
+ fill_common_fields(event, TTCN_Logger::MATCHING_TIMEOUT);
API::MatchingTimeout& mt = event.logEvent().choice().matchingEvent().choice().matchingTimeout();
if (timer_name) mt.timer__name() = timer_name;
Titan version
10.1.2
Platform details (OS type and version)
Any
/cc @aknappqwt @mmagyari