Changeset 2907 for box/trunk/bin
- Timestamp:
- 09/04/2011 21:12:55 (14 months ago)
- Location:
- box/trunk/bin/bbackupd
- Files:
-
- 2 edited
-
BackupDaemon.cpp (modified) (8 diffs)
-
BackupDaemon.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/bin/bbackupd/BackupDaemon.cpp
r2906 r2907 982 982 983 983 // Sync the directory 984 std::string locationPath = (*i)->mPath; 985 #ifdef ENABLE_VSS 986 if((*i)->mIsSnapshotCreated) 987 { 988 locationPath = (*i)->mSnapshotPath; 989 } 990 #endif 991 984 992 (*i)->mpDirectoryRecord->SyncDirectory( 985 993 params, 986 994 BackupProtocolClientListDirectory::RootDirectory, 987 (*i)->mPath, std::string("/") + (*i)->mName);995 locationPath, std::string("/") + (*i)->mName); 988 996 989 997 // Unset exclude lists (just in case) … … 998 1006 // Close any open connection 999 1007 clientContext.CloseAnyOpenConnection(); 1000 1008 1009 #ifdef ENABLE_VSS 1010 CleanupVssBackupComponents(); 1011 #endif 1012 1001 1013 // Get the new store marker 1002 1014 mClientStoreMarker = clientContext.GetClientStoreMarker(); … … 1134 1146 1135 1147 BOX_ERROR("VSS: Failed to initialize for backup: " << message); 1136 goto CreateVssBackupComponents_cleanup_mpVssBackupComponents;1148 return; 1137 1149 } 1138 1150 … … 1147 1159 BOX_ERROR("VSS: Failed to set context to VSS_CTX_BACKUP: " << 1148 1160 GetMsgForHresult(result)); 1149 goto CreateVssBackupComponents_cleanup_mpVssBackupComponents;1161 return; 1150 1162 } 1151 1163 … … 1159 1171 BOX_ERROR("VSS: Failed to set backup state: " << 1160 1172 GetMsgForHresult(result)); 1161 goto CreateVssBackupComponents_cleanup_mpVssBackupComponents;1173 return; 1162 1174 } 1163 1175 … … 1188 1200 BOX_ERROR("Failed to get VSS metadata from writer " << iWriter << 1189 1201 ": " << GetMsgForHresult(result)); 1190 goto CreateVssBackupComponents_cleanup_WriterMetadata;1202 continue; 1191 1203 } 1192 1204 … … 1200 1212 GetMsgForHresult(result)); 1201 1213 pMetadata->Release(); 1202 goto CreateVssBackupComponents_cleanup_mpVssBackupComponents;1214 continue; 1203 1215 } 1204 1216 … … 1583 1595 GetMsgForHresult(result)); 1584 1596 } 1585 1586 CreateVssBackupComponents_cleanup_mpVssBackupComponents: 1597 } 1598 1599 void BackupDaemon::CleanupVssBackupComponents() 1600 { 1601 if(mpVssBackupComponents == NULL) 1602 { 1603 return; 1604 } 1605 1606 CallAndWaitForAsync(&IVssBackupComponents::BackupComplete, 1607 "BackupComplete()"); 1608 1587 1609 mpVssBackupComponents->Release(); 1588 1610 mpVssBackupComponents = NULL; 1589 return;1590 1611 } 1591 1612 #endif -
box/trunk/bin/bbackupd/BackupDaemon.h
r2906 r2907 544 544 bool CallAndWaitForAsync(AsyncMethod method, 545 545 const std::string& description); 546 void CleanupVssBackupComponents(); 546 547 #endif 547 548 };
Note: See TracChangeset
for help on using the changeset viewer.
