[Box Backup-dev] COMMIT r826 - box/chris/merge/bin/bbstored

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Wed, 30 Aug 2006 19:26:11 +0100


Author: chris
Date: 2006-08-30 19:26:11 +0100 (Wed, 30 Aug 2006)
New Revision: 826

Modified:
   box/chris/merge/bin/bbstored/BackupStoreDaemon.cpp
Log:
* bin/bbstored/BackupStoreDaemon.cpp
- Revert to trunk


Modified: box/chris/merge/bin/bbstored/BackupStoreDaemon.cpp
===================================================================
--- box/chris/merge/bin/bbstored/BackupStoreDaemon.cpp	2006-08-30 18:24:04 UTC (rev 825)
+++ box/chris/merge/bin/bbstored/BackupStoreDaemon.cpp	2006-08-30 18:26:11 UTC (rev 826)
@@ -11,12 +11,9 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <syslog.h>
 #include <signal.h>
 
-#ifdef HAVE_SYSLOG_H
-#include <syslog.h>
-#endif
-
 #include "BackupContext.h"
 #include "BackupStoreDaemon.h"
 #include "BackupStoreConfigVerify.h"
@@ -42,11 +39,7 @@
 	  mExtendedLogging(false),
 	  mHaveForkedHousekeeping(false),
 	  mIsHousekeepingProcess(false),
-#ifdef WIN32
-	  mHousekeepingInited(false)
-#else
 	  mInterProcessComms(mInterProcessCommsSocket)
-#endif
 {
 }
 
@@ -163,7 +156,6 @@
 	const Configuration &config(GetConfiguration());
 	mExtendedLogging = config.GetKeyValueBool("ExtendedLogging");
 	
-#ifndef WIN32	
 	// Fork off housekeeping daemon -- must only do this the first time Run() is called
 	if(!mHaveForkedHousekeeping)
 	{
@@ -227,11 +219,9 @@
 	}
 	else
 	{
-#endif // !WIN32
 		// In server process -- use the base class to do the magic
 		ServerTLS<BOX_PORT_BBSTORED>::Run();
 		
-#ifndef WIN32	
 		// Why did it stop? Tell the housekeeping process to do the same
 		if(IsReloadConfigWanted())
 		{
@@ -242,7 +232,6 @@
 			mInterProcessCommsSocket.Write("t\n", 2);
 		}
 	}
-#endif
 }
 
 
@@ -308,8 +297,6 @@
 	// Log the amount of data transferred
 	::syslog(LOG_INFO, "Connection statistics for %s: "
 			"IN=%lld OUT=%lld TOTAL=%lld\n", commonName,
-			(long long)s.GetBytesRead(), 
-			(long long)s.GetBytesWritten(),
-			(long long)s.GetBytesRead() + 
-			(long long)s.GetBytesWritten());
+			s.GetBytesRead(), s.GetBytesWritten(),
+			s.GetBytesRead() + s.GetBytesWritten());
 }