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 firstRunActionTaken = false; |
Felix Dahlke
2013/07/25 14:54:37
"firstRunActionTaken" sounds wrong to my ears, I t
|
Communication::OutputBuffer HandleRequest(Communication::InputBuffer& request) |
{ |
@@ -214,6 +218,20 @@ |
} |
break; |
} |
+ case Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED: |
Felix Dahlke
2013/07/25 14:54:37
How about PROC_IS_FIRST_RUN? The function invoking
Oleksandr
2013/07/26 12:07:01
I would say the PROC_IS_FIRST_RUN would be confusi
Felix Dahlke
2013/08/02 10:52:24
Fair enough I guess. Might want to rename IsFirstR
|
+ { |
+ CriticalSection::Lock lock(firstRunLock); |
+ if (!firstRunActionTaken && filterEngine->IsFirstRun()) |
+ { |
+ response << true; |
+ firstRunActionTaken = true; |
+ } |
+ else |
+ { |
+ response << false; |
+ } |
+ break; |
+ } |
} |
return response; |