summaryrefslogtreecommitdiff
path: root/bin/bbackupd/BackupDaemon.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-10-03 23:22:36 +0000
committerChris Wilson <chris+github@qwirx.com>2008-10-03 23:22:36 +0000
commit192d12a27c64181153e2d93cce5a72db972564d7 (patch)
treefd23b09f20f9a9e798e94fa7739e9672fe476734 /bin/bbackupd/BackupDaemon.h
parent41ae62b3fb1d1bfdfe805b4102b284bfde0ecbf0 (diff)
Remove Win32 command socket thread, as it has caused too much trouble.
Handle command socket on Win32 the same as all other platforms, removing #ifdefs from BackupDaemon. Will replace this thread with regular but not excessive command socket polling using timers in future. Change error messages when command socket comms fail to make them clearer.
Diffstat (limited to 'bin/bbackupd/BackupDaemon.h')
-rw-r--r--bin/bbackupd/BackupDaemon.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/bin/bbackupd/BackupDaemon.h b/bin/bbackupd/BackupDaemon.h
index 0f946164..0e49abcd 100644
--- a/bin/bbackupd/BackupDaemon.h
+++ b/bin/bbackupd/BackupDaemon.h
@@ -27,6 +27,7 @@
#include "autogen_BackupProtocolClient.h"
#ifdef WIN32
+ #include "WinNamedPipeListener.h"
#include "WinNamedPipeStream.h"
#endif
@@ -193,7 +194,8 @@ private:
CommandSocketInfo &operator=(const CommandSocketInfo &);
public:
#ifdef WIN32
- WinNamedPipeStream mListeningSocket;
+ WinNamedPipeListener<1 /* listen backlog */> mListeningSocket;
+ std::auto_ptr<WinNamedPipeStream> mpConnectedSocket;
#else
SocketListen<SocketStream, 1 /* listen backlog */> mListeningSocket;
std::auto_ptr<SocketStream> mpConnectedSocket;
@@ -202,7 +204,7 @@ private:
};
// Using a socket?
- CommandSocketInfo *mpCommandSocketInfo;
+ std::auto_ptr<CommandSocketInfo> mapCommandSocketInfo;
// Stop notifications being repeated.
SysadminNotifier::EventCode mLastNotifiedEvent;
@@ -503,16 +505,9 @@ public:
}
#ifdef WIN32
- public:
- void RunHelperThread(void);
-
private:
- bool mDoSyncFlagOut, mSyncIsForcedOut;
bool mInstallService, mRemoveService, mRunAsService;
std::string mServiceName;
- HANDLE mhMessageToSendEvent, mhCommandReceivedEvent;
- CRITICAL_SECTION mMessageQueueLock;
- std::vector<std::string> mMessageList;
#endif
};