Bläddra i källkod

Removed initialization of callbacksActive, which isn't present in Windows version.

git-svn-id: https://svn.microneil.com/svn/CodeDweller/branches/adeniz_1@43 d34b734f-a00e-4b39-a726-e4eeb87269ab
adeniz_1
adeniz 10 år sedan
förälder
incheckning
0609dcbc33
1 ändrade filer med 39 tillägg och 2 borttagningar
  1. 39
    2
      service.cpp

+ 39
- 2
service.cpp Visa fil

@@ -144,8 +144,8 @@ namespace CodeDweller {
int Service::callbackTimeout_ms = 30 * 1000;
Service::Service() :
callbacksActive(true) {
Service::Service() {
}
Service &Service::getInstance() {
@@ -433,6 +433,8 @@ namespace CodeDweller {
#ifdef DEBUG_LOG_FILE
std::ofstream logStream;
auto startTime = std::chrono::steady_clock::now();
logStream.open(DEBUG_LOG_FILE, std::fstream::app);
logStream << "processCtrlMessage. message: " << message << std::endl;
logStream.close();
@@ -457,10 +459,36 @@ namespace CodeDweller {
pauseReceived = true;
#ifdef DEBUG_LOG_FILE
startTime = std::chrono::steady_clock::now();
#endif
for (auto callback : pauseCallbacks) {
(*callback)();
serviceStatus.dwCheckPoint++;
#ifdef DEBUG_LOG_FILE
logStream.open(DEBUG_LOG_FILE, std::fstream::app);
logStream << "Service::processCtrlMessage. "
<< "Cumulative time after callback (ms): "
<< std::chrono::duration_cast<std::chrono::milliseconds>
(std::chrono::steady_clock::now() - startTime).count()
<< ", dwWaitHint: " << serviceStatus.dwWaitHint
<< std::endl;
logStream.close();
#endif
(void) SetServiceStatus(serviceStatusHandle, &serviceStatus);
#ifdef DEBUG_LOG_FILE
logStream.open(DEBUG_LOG_FILE, std::fstream::app);
logStream << "Service::processCtrlMessage. "
<< "Cumulative time after SetServiceStatus (ms): "
<< std::chrono::duration_cast<std::chrono::milliseconds>
(std::chrono::steady_clock::now() - startTime).count()
<< std::endl;
logStream.close();
#endif
}
serviceStatus.dwControlsAccepted =
@@ -472,6 +500,15 @@ namespace CodeDweller {
serviceStatus.dwCheckPoint = 0;
(void) SetServiceStatus(serviceStatusHandle, &serviceStatus);
#ifdef DEBUG_LOG_FILE
logStream.open(DEBUG_LOG_FILE, std::fstream::app);
logStream << "Service::processCtrlMessage. "
<< "Cumulative time after final SetServiceStatus (ms): "
<< std::chrono::duration_cast<std::chrono::milliseconds>
(std::chrono::steady_clock::now() - startTime).count()
<< std::endl;
logStream.close();
#endif
break;
case SERVICE_CONTROL_CONTINUE:

Laddar…
Avbryt
Spara