Moved the super-file handle into FTK and fixed various memory leaks in the FLAIM/XFLAIM unit tests.

git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@575 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
ahodgkinson
2006-06-15 17:05:55 +00:00
parent 9f7ca8edd3
commit 2fabd31c06
30 changed files with 1343 additions and 1866 deletions

View File

@@ -974,21 +974,22 @@ RCODE F_DbSystem::dbRestore(
// [IN] Object for reporting the status of the restore
// operation
{
IF_FileHdl * pFileHdl = NULL;
IF_FileHdl * pLockFileHdl = NULL;
F_SuperFileHdl * pSFile = NULL;
FLMBYTE szBasePath[ F_PATH_MAX_SIZE];
char szTmpPath[ F_PATH_MAX_SIZE];
FLMUINT uiDbVersion;
FLMUINT uiNextIncNum;
eRestoreAction eAction = XFLM_RESTORE_ACTION_CONTINUE; // default action...
FLMBOOL bRflPreserved;
FLMBOOL bMutexLocked = FALSE;
IF_Db * pDb = NULL;
F_Database * pDatabase = NULL;
F_FSRestore * pFSRestoreObj = NULL;
FLMBOOL bOKToRetry;
RCODE rc = NE_XFLM_OK;
RCODE rc = NE_XFLM_OK;
IF_FileHdl * pFileHdl = NULL;
IF_FileHdl * pLockFileHdl = NULL;
F_SuperFileHdl * pSFile = NULL;
F_SuperFileClient SFileClient;
FLMBYTE szBasePath[ F_PATH_MAX_SIZE];
char szTmpPath[ F_PATH_MAX_SIZE];
FLMUINT uiDbVersion;
FLMUINT uiNextIncNum;
eRestoreAction eAction = XFLM_RESTORE_ACTION_CONTINUE; // default action...
FLMBOOL bRflPreserved;
FLMBOOL bMutexLocked = FALSE;
IF_Db * pDb = NULL;
F_Database * pDatabase = NULL;
F_FSRestore * pFSRestoreObj = NULL;
FLMBOOL bOKToRetry;
// Set up the callback
@@ -1088,8 +1089,13 @@ RCODE F_DbSystem::dbRestore(
rc = RC_SET( NE_XFLM_MEM);
goto Exit;
}
if( RC_BAD( rc = SFileClient.setup( pszDbPath, pszDataDir)))
{
goto Exit;
}
if( RC_BAD( rc = pSFile->setup( pszDbPath, pszDataDir)))
if( RC_BAD( rc = pSFile->setup( &SFileClient)))
{
goto Exit;
}