| Index: src/engine/main.cpp |
| =================================================================== |
| --- a/src/engine/main.cpp |
| +++ b/src/engine/main.cpp |
| @@ -8,6 +8,7 @@ |
| #include "../shared/Dictionary.h" |
| #include "../shared/Utils.h" |
| #include "../shared/Version.h" |
| +#include "../shared/CriticalSection.h" |
| #include "Debug.h" |
| #include "Updater.h" |
| @@ -38,6 +39,9 @@ |
| << subscription->IsListed(); |
| } |
| } |
| + |
| + CriticalSection firstRunLock; |
| + bool firstRunActionExecuted = false; |
| Communication::OutputBuffer HandleRequest(Communication::InputBuffer& request) |
| { |
| @@ -214,6 +218,20 @@ |
| } |
| break; |
| } |
| + case Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED: |
| + { |
| + CriticalSection::Lock lock(firstRunLock); |
| + if (!firstRunActionExecuted && filterEngine->IsFirstRun()) |
| + { |
| + response << true; |
| + firstRunActionExecuted = true; |
| + } |
| + else |
| + { |
| + response << false; |
| + } |
| + break; |
| + } |
| } |
| return response; |