[Box Backup-dev] COMMIT r774 - box/chris/general/bin/bbackupd
boxbackup-dev at fluffy.co.uk
boxbackup-dev at fluffy.co.uk
Fri Aug 11 09:33:15 BST 2006
Author: chris
Date: 2006-08-11 09:33:15 +0100 (Fri, 11 Aug 2006)
New Revision: 774
Modified:
box/chris/general/bin/bbackupd/BackupDaemon.cpp
Log:
* bin/bbackupd/BackupDaemon.cpp
- Set the 'Command Received' Event to signalled when a command requiring
action by the main thread is received (how did this ever work before?)
- Close (destroy) events when command socket thread quits
- Removed useless disabled Win32 code
Modified: box/chris/general/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/general/bin/bbackupd/BackupDaemon.cpp 2006-08-10 20:59:08 UTC (rev 773)
+++ box/chris/general/bin/bbackupd/BackupDaemon.cpp 2006-08-11 08:33:15 UTC (rev 774)
@@ -415,6 +415,7 @@
this->mDoSyncFlagOut = true;
this->mSyncIsForcedOut = false;
sendOK = true;
+ SetEvent(mhCommandReceivedEvent);
}
else if(command == "force-sync")
{
@@ -422,18 +423,21 @@
this->mDoSyncFlagOut = true;
this->mSyncIsForcedOut = true;
sendOK = true;
+ SetEvent(mhCommandReceivedEvent);
}
else if(command == "reload")
{
// Reload the configuration
SetReloadConfigWanted();
sendOK = true;
+ SetEvent(mhCommandReceivedEvent);
}
else if(command == "terminate")
{
// Terminate the daemon cleanly
SetTerminateWanted();
sendOK = true;
+ SetEvent(mhCommandReceivedEvent);
}
else
{
@@ -454,8 +458,6 @@
{
break;
}
-
- // this->mReceivedCommandConn = true;
}
rSocket.Close();
@@ -470,6 +472,9 @@
::syslog(LOG_ERR, "Communication error with control client");
}
}
+
+ CloseHandle(mhCommandReceivedEvent);
+ CloseHandle(mhMessageToSendEvent);
}
#endif
@@ -1143,10 +1148,6 @@
TRACE1("Receiving command '%s' over command socket\n",
command.c_str());
- #ifdef WIN32
- SetEvent(mhCommandReceivedEvent);
- #endif
-
bool sendOK = false;
bool sendResponse = true;
More information about the Boxbackup-dev
mailing list