[Box Backup-dev] COMMIT r849 - box/chris/retry-debug/bin/bbstored

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Thu Aug 31 09:17:39 BST 2006


Author: chris
Date: 2006-08-31 09:17:39 +0100 (Thu, 31 Aug 2006)
New Revision: 849

Modified:
   box/chris/retry-debug/bin/bbstored/HousekeepStoreAccount.cpp
Log:
* bin/bbstored/HousekeepStoreAccount.cpp
- Disable checks for inter-process messages on Win32 (there is only one
  process)
- Close directory immediately after we finish reading it


Modified: box/chris/retry-debug/bin/bbstored/HousekeepStoreAccount.cpp
===================================================================
--- box/chris/retry-debug/bin/bbstored/HousekeepStoreAccount.cpp	2006-08-31 08:17:04 UTC (rev 848)
+++ box/chris/retry-debug/bin/bbstored/HousekeepStoreAccount.cpp	2006-08-31 08:17:39 UTC (rev 849)
@@ -225,6 +225,7 @@
 // --------------------------------------------------------------------------
 bool HousekeepStoreAccount::ScanDirectory(int64_t ObjectID)
 {
+#ifndef WIN32
 	if((--mCountUntilNextInterprocessMsgCheck) <= 0)
 	{
 		mCountUntilNextInterprocessMsgCheck = POLL_INTERPROCESS_MSG_CHECK_FREQUENCY;
@@ -235,6 +236,7 @@
 			return false;
 		}
 	}
+#endif
 
 	// Get the filename
 	std::string objectFilename;
@@ -251,6 +253,7 @@
 	// Read the directory in
 	BackupStoreDirectory dir;
 	dir.ReadFromStream(*dirStream, IOStream::TimeOutInfinite);
+	dirStream->Close();
 	
 	// Is it empty?
 	if(dir.GetNumberOfEntries() == 0)
@@ -485,6 +488,7 @@
 	// (there is likely to be more in the set than should be actually deleted).
 	for(std::set<DelEn, DelEnCompare>::iterator i(mPotentialDeletions.begin()); i != mPotentialDeletions.end(); ++i)
 	{
+#ifndef WIN32
 		if((--mCountUntilNextInterprocessMsgCheck) <= 0)
 		{
 			mCountUntilNextInterprocessMsgCheck = POLL_INTERPROCESS_MSG_CHECK_FREQUENCY;
@@ -495,6 +499,7 @@
 				return true;
 			}
 		}
+#endif
 
 		// Load up the directory it's in
 		// Get the filename
@@ -729,6 +734,7 @@
 		// Go through list
 		for(std::vector<int64_t>::const_iterator i(mEmptyDirectories.begin()); i != mEmptyDirectories.end(); ++i)
 		{
+#ifndef WIN32
 			if((--mCountUntilNextInterprocessMsgCheck) <= 0)
 			{
 				mCountUntilNextInterprocessMsgCheck = POLL_INTERPROCESS_MSG_CHECK_FREQUENCY;
@@ -739,6 +745,7 @@
 					return true;
 				}
 			}
+#endif
 
 			// Do not delete the root directory
 			if(*i == BACKUPSTORE_ROOT_DIRECTORY_ID)




More information about the Boxbackup-dev mailing list