I have not any other comments. The implementation is trivial. I rerun all tests and tests passed.
I'll mark this patch as ready for commiters.
Oops, I just noticed a stupid confusion on my part which got through, I was setting "ERROR" as "success", inverting the expected boolean value.
Here is a fixed version.
I missed it too.
We can introduce macro SetVariableBool(vars, varname, bool) instead
SetVariable(pset.vars, "ERROR", "FALSE");
I checked source code, and it requires little bit more harder refactoring because now we have SetVariableBool - what is unhappy name, because it initialize variable to ON value. It is question what is better name?
I found more interesting issue - the code of SetResultVariables is partially redundant with AcceptResult - maybe the switch there can be shared.