[Box Backup-dev] COMMIT r595 - box/chris/general/bin/bbstored

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Sat, 27 May 2006 09:54:45 +0000 (GMT)


Author: chris
Date: 2006-05-27 09:54:37 +0000 (Sat, 27 May 2006)
New Revision: 595

Modified:
   box/chris/general/bin/bbstored/BackupStoreDaemon.cpp
Log:
* BackupStoreDaemon.cpp
- Disable interprocess comms on Win32
- Fixed formatting of connection statistics on Win32


Modified: box/chris/general/bin/bbstored/BackupStoreDaemon.cpp
===================================================================
--- box/chris/general/bin/bbstored/BackupStoreDaemon.cpp	2006-05-27 09:52:52 UTC (rev 594)
+++ box/chris/general/bin/bbstored/BackupStoreDaemon.cpp	2006-05-27 09:54:37 UTC (rev 595)
@@ -42,7 +42,10 @@
 	  mExtendedLogging(false),
 	  mHaveForkedHousekeeping(false),
 	  mIsHousekeepingProcess(false),
-	  mInterProcessComms(mInterProcessCommsSocket)
+#ifndef WIN32
+	  mInterProcessComms(mInterProcessCommsSocket),
+#endif
+	  mHousekeepingInited(false)
 {
 }
 
@@ -215,7 +218,6 @@
 			THROW_EXCEPTION(ServerException, SocketCloseError)
 		}
 	}
-#endif // !WIN32
 
 	if(mIsHousekeepingProcess)
 	{
@@ -224,9 +226,11 @@
 	}
 	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())
 		{
@@ -237,6 +241,7 @@
 			mInterProcessCommsSocket.Write("t\n", 2);
 		}
 	}
+#endif
 }
 
 
@@ -302,6 +307,8 @@
 	// Log the amount of data transferred
 	::syslog(LOG_INFO, "Connection statistics for %s: "
 			"IN=%lld OUT=%lld TOTAL=%lld\n", commonName,
-			s.GetBytesRead(), s.GetBytesWritten(),
-			s.GetBytesRead() + s.GetBytesWritten());
+			(long long)s.GetBytesRead(), 
+			(long long)s.GetBytesWritten(),
+			(long long)s.GetBytesRead() + 
+			(long long)s.GetBytesWritten());
 }