소스 검색

Fixed persistent state data bug. Persistent state data is now saved once per second after updating status logs.

Improved snfLOGmgr d'tor so that final persistent state data is only saved (attempted) if snfLOGmgr has been Configured.

git-svn-id: https://svn.microneil.com/svn/SNFMulti/trunk@22 dc71a809-1921-45c4-985c-09c81d0142d9
wx
madscientist 15 년 전
부모
커밋
b0bc7fdb25
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3
    2
      snfLOGmgr.cpp

+ 3
- 2
snfLOGmgr.cpp 파일 보기

@@ -249,7 +249,7 @@ snfLOGmgr::snfLOGmgr() :

snfLOGmgr::~snfLOGmgr() { // When we go away we must
stop(); // stop if we haven't already.
Status.store(PersistentFileName); // and store our persistent data.
if(Configured) Status.store(PersistentFileName); // If safe, store our persistent data.
}

void snfLOGmgr::linkNETmgr(snfNETmgr& N) { myNETmgr = &N; } // Link in my NETmgr
@@ -884,7 +884,8 @@ void snfLOGmgr::myTask() {
Sleeper WaitATic(MillisecondsInASecond); // One second sleeper.
while(!TimeToDie) { // Do this until it's time to die.
if(Configured) { // If we are configured do our work.
do_StatusReports(); // Status reports are chained.
do_StatusReports(); // Make our status reports (chained).
Status.store(PersistentFileName); // Store our persistent data.
}
WaitATic();
}

Loading…
취소
저장