Changeset 2631 for box/trunk/bin/bbackupd/BackupDaemon.cpp
- Timestamp:
- 22/02/2010 22:10:04 (2 years ago)
- File:
-
- 1 edited
-
box/trunk/bin/bbackupd/BackupDaemon.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/bin/bbackupd/BackupDaemon.cpp
r2597 r2631 1785 1785 void BackupDaemon::SetupIDMapsForSync() 1786 1786 { 1787 // Need to do different things depending on whether it's an1788 // in memory implementation, or whether it's all stored on disc.1789 1790 #ifdef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION1791 1792 // Make sure we have some blank, empty ID maps1793 DeleteIDMapVector(mNewIDMaps);1794 FillIDMapVector(mNewIDMaps, true /* new maps */);1795 1796 // Then make sure that the current maps have objects,1797 // even if they are empty (for the very first run)1798 if(mCurrentIDMaps.empty())1799 {1800 FillIDMapVector(mCurrentIDMaps, false /* current maps */);1801 }1802 1803 #else1804 1805 1787 // Make sure we have some blank, empty ID maps 1806 1788 DeleteIDMapVector(mNewIDMaps); … … 1808 1790 DeleteIDMapVector(mCurrentIDMaps); 1809 1791 FillIDMapVector(mCurrentIDMaps, false /* new maps */); 1810 1811 #endif1812 1792 } 1813 1793 … … 1936 1916 void BackupDaemon::CommitIDMapsAfterSync() 1937 1917 { 1938 // Need to do different things depending on whether it's an in memory implementation,1939 // or whether it's all stored on disc.1940 1941 #ifdef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION1942 // Remove the current ID maps1943 DeleteIDMapVector(mCurrentIDMaps);1944 1945 // Copy the (pointers to) "new" maps over to be the new "current" maps1946 mCurrentIDMaps = mNewIDMaps;1947 1948 // Clear the new ID maps vector (not delete them!)1949 mNewIDMaps.clear();1950 1951 #else1952 1953 1918 // Get rid of the maps in memory (leaving them on disc of course) 1954 1919 DeleteIDMapVector(mCurrentIDMaps); … … 1974 1939 } 1975 1940 } 1976 1977 #endif1978 1941 } 1979 1942 … … 1997 1960 1998 1961 // Close and delete 1999 toDel->Close(); 2000 delete toDel; 1962 win32 rename delete toDel; 2001 1963 } 2002 1964 ASSERT(rVector.size() == 0);
Note: See TracChangeset
for help on using the changeset viewer.
