diff --git a/winixd/core/plugin.cpp b/winixd/core/plugin.cpp index 232a8c9..72383f8 100644 --- a/winixd/core/plugin.cpp +++ b/winixd/core/plugin.cpp @@ -4,8 +4,8 @@ * Author: Tomasz Sowa */ -/* - * Copyright (c) 2008-2022, Tomasz Sowa +/* + * Copyright (c) 2008-2023, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -370,10 +370,13 @@ PluginRes Plugin::Call(morm::ModelConnector * model_connector, Log * plog, Cur * Call(model_connector, plog, cur, message, i, info); - if( info.res ) - ++res.res_true; - else - ++res.res_false; + if( info.has_res ) + { + if( info.res ) + ++res.res_true; + else + ++res.res_false; + } } current_plugin = old_current_plugin; diff --git a/winixd/core/plugin.h b/winixd/core/plugin.h index e672b54..73deb65 100644 --- a/winixd/core/plugin.h +++ b/winixd/core/plugin.h @@ -4,8 +4,8 @@ * Author: Tomasz Sowa */ -/* - * Copyright (c) 2008-2022, Tomasz Sowa +/* + * Copyright (c) 2008-2023, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -120,6 +120,12 @@ struct PluginInfo // to create your plugin's session data PluginDataBase * plugin_data_base; // !! zmienic nazwe na plugin_session_base ? a moze session_base; a moze plugin_session? + // whether or not there is a res (bool) value set + // default: true + // if set to false then the 'res' is not taken into account when calculating how many plugins + // have returned true or false + bool has_res; + // function return status // default: false (if not set by the plugin) bool res; @@ -137,6 +143,7 @@ struct PluginInfo plugin_id = -1; plugin_data_base = 0; + has_res = true; res = false; }