Changed calls to disableLogging and enableLogging to work the way they used to.
git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@479 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
@@ -39,8 +39,8 @@ RCODE F_Db::upgrade(
|
||||
F_Rfl * pRfl = m_pDatabase->m_pRfl;
|
||||
SFLM_DB_HDR * pUncommittedDbHdr = &m_pDatabase->m_uncommittedDbHdr;
|
||||
FLMUINT64 ui64SaveTransId;
|
||||
FLMUINT uiRflToken = 0;
|
||||
FLMBOOL bUpgradeNeeded = FALSE;
|
||||
FLMUINT uiDisableCount = 0;
|
||||
|
||||
// Lock the database if not already locked.
|
||||
// Cannot lose exclusive access between the checkpoint and
|
||||
@@ -89,7 +89,7 @@ RCODE F_Db::upgrade(
|
||||
// Change state of logging OFF to TRUE - don't want anything
|
||||
// logged during conversion except for the upgrade packet.
|
||||
|
||||
uiDisableCount = pRfl->disableLogging();
|
||||
pRfl->disableLogging( &uiRflToken);
|
||||
m_uiFlags |= FDB_UPGRADING;
|
||||
|
||||
ui64SaveTransId = m_pDatabase->m_lastCommittedDbHdr.ui64CurrTransID;
|
||||
@@ -152,7 +152,7 @@ RCODE F_Db::upgrade(
|
||||
|
||||
// Log the upgrade packet to the RFL
|
||||
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
|
||||
// Log the upgrade packet.
|
||||
|
||||
@@ -163,7 +163,7 @@ RCODE F_Db::upgrade(
|
||||
|
||||
// Turn logging off again
|
||||
|
||||
uiDisableCount = pRfl->disableLogging();
|
||||
pRfl->disableLogging( &uiRflToken);
|
||||
|
||||
// Change the FLAIM version number to the new version number.
|
||||
|
||||
@@ -200,9 +200,9 @@ Exit:
|
||||
(void)abortTrans();
|
||||
}
|
||||
|
||||
if (uiDisableCount)
|
||||
if (uiRflToken)
|
||||
{
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
// Turn off the upgrade flag, in case it was turned on above.
|
||||
@@ -229,7 +229,7 @@ RCODE F_Db::enableEncryption( void)
|
||||
SFLM_DB_HDR * pucUncommittedLogHdr = &m_pDatabase->m_uncommittedDbHdr;
|
||||
FLMBOOL bLocked = FALSE;
|
||||
FLMBOOL bStartedTrans = FALSE;
|
||||
FLMBOOL bEnableLogging = FALSE;
|
||||
FLMUINT uiRflToken = 0;
|
||||
|
||||
// We must will start our own transaction
|
||||
|
||||
@@ -251,8 +251,7 @@ RCODE F_Db::enableEncryption( void)
|
||||
|
||||
// Disable RFL logging
|
||||
|
||||
bEnableLogging = pRfl->isLoggingEnabled();
|
||||
pRfl->disableLogging();
|
||||
pRfl->disableLogging( &uiRflToken);
|
||||
|
||||
// Begin an update transaction.
|
||||
|
||||
@@ -290,9 +289,9 @@ RCODE F_Db::enableEncryption( void)
|
||||
m_pDatabase->m_bInLimitedMode = FALSE;
|
||||
m_pDatabase->m_bHaveEncKey = TRUE;
|
||||
|
||||
// Log the upgrade packet
|
||||
// Log the encryption key packet
|
||||
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
|
||||
if (RC_BAD( rc = pRfl->logEncryptionKey( this,
|
||||
RFL_ENABLE_ENCRYPTION_PACKET, pucWrappingKey, ui32KeyLen)))
|
||||
@@ -302,7 +301,7 @@ RCODE F_Db::enableEncryption( void)
|
||||
|
||||
// Turn logging off again
|
||||
|
||||
pRfl->disableLogging();
|
||||
pRfl->disableLogging( &uiRflToken);
|
||||
|
||||
// Commit the transaction and force a checkpoint
|
||||
|
||||
@@ -320,9 +319,9 @@ Exit:
|
||||
transAbort();
|
||||
}
|
||||
|
||||
if (bEnableLogging)
|
||||
if( uiRflToken)
|
||||
{
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
if( bLocked)
|
||||
@@ -356,7 +355,7 @@ RCODE F_Db::wrapKey(
|
||||
FLMUINT32 ui32KeyLen = SFLM_MAX_ENC_KEY_SIZE;
|
||||
F_Rfl * pRfl = m_pDatabase->m_pRfl;
|
||||
FLMBOOL bLocked = FALSE;
|
||||
FLMBOOL bEnableLogging = FALSE;
|
||||
FLMUINT uiRflToken = 0;
|
||||
|
||||
if( getTransType() != SFLM_NO_TRANS)
|
||||
{
|
||||
@@ -375,8 +374,7 @@ RCODE F_Db::wrapKey(
|
||||
|
||||
// Turn off logging. We only want to log the wrap key packet.
|
||||
|
||||
bEnableLogging = pRfl->isLoggingEnabled();
|
||||
pRfl->disableLogging();
|
||||
pRfl->disableLogging( &uiRflToken);
|
||||
|
||||
// Start the transaction
|
||||
|
||||
@@ -400,7 +398,7 @@ RCODE F_Db::wrapKey(
|
||||
|
||||
// Turn on logging. We only want to log the wrap key packet.
|
||||
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
|
||||
// Log a wrapped key packet to record that the key
|
||||
// has been wrapped/encrypted.
|
||||
@@ -413,7 +411,7 @@ RCODE F_Db::wrapKey(
|
||||
|
||||
// Turn logging off again
|
||||
|
||||
pRfl->disableLogging();
|
||||
pRfl->disableLogging( &uiRflToken);
|
||||
|
||||
// Make sure the log header gets written out...
|
||||
|
||||
@@ -456,9 +454,9 @@ Exit:
|
||||
transAbort();
|
||||
}
|
||||
|
||||
if( bEnableLogging)
|
||||
if( uiRflToken)
|
||||
{
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
if( bLocked)
|
||||
@@ -565,7 +563,7 @@ RCODE F_Db::rollOverDbKey( void)
|
||||
FLMUINT32 ui32BufLen = 0;
|
||||
F_Row * pRow = NULL;
|
||||
FSTableCursor * pTableCursor = NULL;
|
||||
FLMBOOL bEnableLogging = FALSE;
|
||||
FLMUINT uiRflToken = 0;
|
||||
|
||||
if( getTransType() != SFLM_NO_TRANS)
|
||||
{
|
||||
@@ -585,8 +583,7 @@ RCODE F_Db::rollOverDbKey( void)
|
||||
|
||||
// Turn off logging
|
||||
|
||||
bEnableLogging = pRfl->isLoggingEnabled();
|
||||
pRfl->disableLogging();
|
||||
pRfl->disableLogging( &uiRflToken);
|
||||
|
||||
// Start the transaction
|
||||
|
||||
@@ -678,7 +675,7 @@ RCODE F_Db::rollOverDbKey( void)
|
||||
}
|
||||
bStartedTrans = FALSE;
|
||||
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
|
||||
if( RC_BAD( rc = m_pDatabase->m_pRfl->logRollOverDbKey( this)))
|
||||
{
|
||||
@@ -692,9 +689,9 @@ Exit:
|
||||
transAbort();
|
||||
}
|
||||
|
||||
if( bEnableLogging)
|
||||
if( uiRflToken)
|
||||
{
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
if( bLocked)
|
||||
|
||||
@@ -42,7 +42,7 @@ RCODE F_DbSystem::dbCreate(
|
||||
FLMBOOL bDatabaseCreated = FALSE;
|
||||
FLMBOOL bNewDatabase = FALSE;
|
||||
FLMBOOL bMutexLocked = FALSE;
|
||||
FLMBOOL bEnableLogging = FALSE;
|
||||
FLMUINT uiRflToken = 0;
|
||||
|
||||
// Make sure the path looks valid
|
||||
|
||||
@@ -173,8 +173,7 @@ RCODE F_DbSystem::dbCreate(
|
||||
|
||||
if( pDatabase->m_pRfl)
|
||||
{
|
||||
bEnableLogging = pDatabase->m_pRfl->isLoggingEnabled();
|
||||
pDatabase->m_pRfl->disableLogging();
|
||||
pDatabase->m_pRfl->disableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
// Set FFILE stuff to same state as a completed checkpoint.
|
||||
@@ -232,9 +231,9 @@ Exit:
|
||||
dbSystem.dbRemove( pszFilePath, pszDataDir, pszRflDir, TRUE);
|
||||
}
|
||||
}
|
||||
else if (bEnableLogging)
|
||||
else if( uiRflToken)
|
||||
{
|
||||
pDatabase->m_pRfl->enableLogging();
|
||||
pDatabase->m_pRfl->enableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
return( rc);
|
||||
@@ -252,11 +251,11 @@ RCODE F_Db::initDbFiles(
|
||||
FLMBYTE * pucBuf = NULL;
|
||||
FLMUINT uiBlkSize;
|
||||
FLMUINT uiWriteBytes;
|
||||
FLMUINT uiRflToken = 0;
|
||||
SFLM_DB_HDR * pDbHdr;
|
||||
F_BLK_HDR * pBlkHdr;
|
||||
F_CachedBlock * pSCache = NULL;
|
||||
FLMBYTE * pucWrappingKey = NULL;
|
||||
FLMBOOL bEnableLogging = FALSE;
|
||||
#ifdef FLM_USE_NICI
|
||||
FLMUINT32 ui32KeyLen = 0;
|
||||
#endif
|
||||
@@ -405,8 +404,7 @@ RCODE F_Db::initDbFiles(
|
||||
|
||||
// Disable RFL logging
|
||||
|
||||
bEnableLogging = m_pDatabase->m_pRfl->isLoggingEnabled();
|
||||
m_pDatabase->m_pRfl->disableLogging();
|
||||
m_pDatabase->m_pRfl->disableLogging( &uiRflToken);
|
||||
|
||||
// Start an update transaction and populate the dictionary.
|
||||
// This also creates the default collections and indexes.
|
||||
@@ -458,9 +456,9 @@ Exit:
|
||||
abortTrans();
|
||||
}
|
||||
|
||||
if( bEnableLogging)
|
||||
if( uiRflToken)
|
||||
{
|
||||
m_pDatabase->m_pRfl->enableLogging();
|
||||
m_pDatabase->m_pRfl->enableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
if (pSCache)
|
||||
|
||||
@@ -146,7 +146,7 @@ RCODE F_Db::indexSuspend(
|
||||
F_TABLE * pTable;
|
||||
FLMBOOL bMustAbortOnError = FALSE;
|
||||
F_Rfl * pRfl = m_pDatabase->m_pRfl;
|
||||
FLMBOOL bEnableLogging = FALSE;
|
||||
FLMUINT uiRflToken = 0;
|
||||
|
||||
if (RC_BAD( rc = checkState( __FILE__, __LINE__)))
|
||||
{
|
||||
@@ -204,8 +204,7 @@ RCODE F_Db::indexSuspend(
|
||||
|
||||
// Disable RFL logging
|
||||
|
||||
bEnableLogging = pRfl->isLoggingEnabled();
|
||||
pRfl->disableLogging();
|
||||
pRfl->disableLogging( &uiRflToken);
|
||||
|
||||
// Must abort on error
|
||||
|
||||
@@ -242,7 +241,7 @@ RCODE F_Db::indexSuspend(
|
||||
|
||||
// Log the suspend packet to the RFL
|
||||
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
|
||||
if (RC_BAD( rc = m_pDatabase->m_pRfl->logIndexSuspendOrResume(
|
||||
this, uiIndexNum, RFL_INDEX_SUSPEND_PACKET)))
|
||||
@@ -252,9 +251,9 @@ RCODE F_Db::indexSuspend(
|
||||
|
||||
Exit:
|
||||
|
||||
if( bEnableLogging)
|
||||
if( uiRflToken)
|
||||
{
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
if( RC_BAD( rc))
|
||||
@@ -289,7 +288,7 @@ RCODE F_Db::indexResume(
|
||||
F_INDEX * pIndex;
|
||||
FLMBOOL bStartedTrans = FALSE;
|
||||
FLMBOOL bMustAbortOnError = FALSE;
|
||||
FLMBOOL bEnableLogging = FALSE;
|
||||
FLMUINT uiRflToken = 0;
|
||||
F_Rfl * pRfl = m_pDatabase->m_pRfl;
|
||||
|
||||
if (RC_BAD( rc = checkState( __FILE__, __LINE__)))
|
||||
@@ -346,8 +345,7 @@ RCODE F_Db::indexResume(
|
||||
|
||||
// Disable RFL logging
|
||||
|
||||
bEnableLogging = pRfl->isLoggingEnabled();
|
||||
pRfl->disableLogging();
|
||||
pRfl->disableLogging( &uiRflToken);
|
||||
|
||||
// Point of no return -- must abort on error
|
||||
|
||||
@@ -383,7 +381,7 @@ RCODE F_Db::indexResume(
|
||||
|
||||
// Log the resume packet to the RFL
|
||||
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
|
||||
if (RC_BAD( rc = pRfl->logIndexSuspendOrResume(
|
||||
this, uiIndexNum, RFL_INDEX_RESUME_PACKET)))
|
||||
@@ -393,9 +391,9 @@ RCODE F_Db::indexResume(
|
||||
|
||||
Exit:
|
||||
|
||||
if( bEnableLogging)
|
||||
if( uiRflToken)
|
||||
{
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
if( RC_BAD( rc))
|
||||
|
||||
@@ -49,7 +49,7 @@ RCODE F_Db::reduceSize(
|
||||
FLMBOOL bFlagSet;
|
||||
FLMBOOL bTransActive = FALSE;
|
||||
FLMBOOL bLockedDb = FALSE;
|
||||
FLMBOOL bEnableLogging = FALSE;
|
||||
FLMUINT uiRflToken = 0;
|
||||
|
||||
uiNumBlksMoved = 0;
|
||||
|
||||
@@ -92,8 +92,7 @@ RCODE F_Db::reduceSize(
|
||||
// Disable RFL logging - don't want anything logged during reduce
|
||||
// except for the reduce packet.
|
||||
|
||||
bEnableLogging = pRfl->isLoggingEnabled();
|
||||
pRfl->disableLogging();
|
||||
pRfl->disableLogging( &uiRflToken);
|
||||
|
||||
// Keep looping to here until the count is satisfied or there
|
||||
// are not any more log extent blocks to turn into avail blks.
|
||||
@@ -240,7 +239,7 @@ RCODE F_Db::reduceSize(
|
||||
// restore or recovery. Will need to re-enable logging temporarily
|
||||
// and then turn it back off after logging the packet.
|
||||
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
|
||||
// Log the reduce.
|
||||
|
||||
@@ -251,7 +250,7 @@ RCODE F_Db::reduceSize(
|
||||
|
||||
// Turn logging back off.
|
||||
|
||||
pRfl->disableLogging();
|
||||
pRfl->disableLogging( &uiRflToken);
|
||||
|
||||
if (RC_BAD( rc))
|
||||
{
|
||||
@@ -298,9 +297,9 @@ Exit:
|
||||
*puiCount = uiNumBlksMoved;
|
||||
}
|
||||
|
||||
if (bEnableLogging)
|
||||
if (uiRflToken)
|
||||
{
|
||||
pRfl->enableLogging();
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
if (bLockedDb)
|
||||
|
||||
@@ -146,6 +146,7 @@ RCODE F_Db::beginTrans(
|
||||
RCODE rc = NE_SFLM_OK;
|
||||
SFLM_DB_HDR * pLastCommittedDbHdr;
|
||||
F_Rfl * pRfl = m_pDatabase->m_pRfl;
|
||||
FLMUINT uiRflToken = 0;
|
||||
FLMBOOL bMutexLocked = FALSE;
|
||||
|
||||
// Should not be calling on a temporary database
|
||||
@@ -375,6 +376,11 @@ RCODE F_Db::beginTrans(
|
||||
|
||||
if (!m_pDict)
|
||||
{
|
||||
if (eTransType != SFLM_READ_TRANS)
|
||||
{
|
||||
pRfl->disableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
if (RC_BAD( rc = readDictionary()))
|
||||
{
|
||||
goto Exit;
|
||||
@@ -388,6 +394,11 @@ Exit:
|
||||
m_pDatabase->unlockMutex();
|
||||
}
|
||||
|
||||
if( uiRflToken)
|
||||
{
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
if (eTransType != SFLM_READ_TRANS)
|
||||
{
|
||||
if (RC_OK( rc))
|
||||
|
||||
@@ -48,6 +48,7 @@ RCODE F_Db::commitTrans(
|
||||
FLMBOOL bOkToLogAbort = TRUE;
|
||||
FLMBOOL bIndexAfterCommit = FALSE;
|
||||
F_Rfl * pRfl = m_pDatabase->m_pRfl;
|
||||
FLMUINT uiRflToken = 0;
|
||||
F_TABLE * pTable;
|
||||
FLMUINT uiLfNum;
|
||||
|
||||
@@ -90,6 +91,10 @@ RCODE F_Db::commitTrans(
|
||||
goto Exit1;
|
||||
}
|
||||
|
||||
// Disable RFL logging
|
||||
|
||||
pRfl->disableLogging( &uiRflToken);
|
||||
|
||||
// Disable DB header writes
|
||||
|
||||
pRfl->clearDbHdrs();
|
||||
@@ -146,6 +151,7 @@ RCODE F_Db::commitTrans(
|
||||
if (!m_bHadUpdOper)
|
||||
{
|
||||
bOkToLogAbort = FALSE;
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
|
||||
rc = pRfl->logEndTransaction( this, RFL_TRNS_COMMIT_PACKET, TRUE);
|
||||
|
||||
@@ -171,6 +177,10 @@ RCODE F_Db::commitTrans(
|
||||
goto Exit1;
|
||||
}
|
||||
|
||||
// Re-enable RFL logging
|
||||
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
|
||||
// Log commit record to roll-forward log
|
||||
|
||||
bOkToLogAbort = FALSE;
|
||||
@@ -510,6 +520,11 @@ Exit1:
|
||||
|
||||
Exit:
|
||||
|
||||
if( uiRflToken)
|
||||
{
|
||||
pRfl->enableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
return( rc);
|
||||
}
|
||||
|
||||
|
||||
@@ -1042,10 +1042,11 @@ RCODE F_Db::maintBlockChainFree(
|
||||
FLMUINT uiExpectedEndBlkAddr,
|
||||
FLMUINT * puiBlocksFreed)
|
||||
{
|
||||
RCODE rc = NE_SFLM_OK;
|
||||
FLMUINT uiBlocksFreed = 0;
|
||||
FLMUINT uiEndBlkAddr = 0;
|
||||
F_Row * pRow = NULL;
|
||||
RCODE rc = NE_SFLM_OK;
|
||||
FLMUINT uiBlocksFreed = 0;
|
||||
FLMUINT uiEndBlkAddr = 0;
|
||||
F_Row * pRow = NULL;
|
||||
FLMUINT uiRflToken = 0;
|
||||
|
||||
// Make sure an update transaction is going and that a
|
||||
// non-zero number of blocks was specified
|
||||
@@ -1056,6 +1057,8 @@ RCODE F_Db::maintBlockChainFree(
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
m_pDatabase->m_pRfl->disableLogging( &uiRflToken);
|
||||
|
||||
if( RC_BAD( rc = btFreeBlockChain(
|
||||
this, NULL, uiStartBlkAddr, uiBlocksToFree,
|
||||
&uiBlocksFreed, &uiEndBlkAddr, NULL)))
|
||||
@@ -1095,6 +1098,11 @@ RCODE F_Db::maintBlockChainFree(
|
||||
}
|
||||
}
|
||||
|
||||
if (uiRflToken)
|
||||
{
|
||||
m_pDatabase->m_pRfl->enableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
if( RC_BAD( rc = m_pDatabase->m_pRfl->logBlockChainFree(
|
||||
this, ui64MaintRowId, uiStartBlkAddr, uiEndBlkAddr, uiBlocksFreed)))
|
||||
{
|
||||
@@ -1108,6 +1116,11 @@ RCODE F_Db::maintBlockChainFree(
|
||||
|
||||
Exit:
|
||||
|
||||
if (uiRflToken)
|
||||
{
|
||||
m_pDatabase->m_pRfl->enableLogging( &uiRflToken);
|
||||
}
|
||||
|
||||
if (pRow)
|
||||
{
|
||||
pRow->ReleaseRow();
|
||||
|
||||
@@ -134,7 +134,7 @@ F_Rfl::F_Rfl()
|
||||
m_eLastLfType = SFLM_LF_INVALID;
|
||||
m_pIxCompareObject = NULL;
|
||||
m_pCompareObject = NULL;
|
||||
m_uiDisabledCount = 0;
|
||||
m_uiDisableCount = 0;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
@@ -4714,6 +4714,7 @@ RCODE F_Rfl::recover(
|
||||
FLMBOOL bLastTransEndedAtFileEOF = FALSE;
|
||||
FLMBOOL bForceNextFile;
|
||||
FLMBOOL bHitEnd;
|
||||
FLMUINT uiRflToken = 0;
|
||||
|
||||
flmAssert( m_pDatabase);
|
||||
|
||||
@@ -4727,7 +4728,7 @@ RCODE F_Rfl::recover(
|
||||
|
||||
// Turn off logging.
|
||||
|
||||
disableLogging();
|
||||
disableLogging( &uiRflToken);
|
||||
|
||||
// Set the replay flag on the database.
|
||||
|
||||
@@ -5489,7 +5490,7 @@ Finish_Recovery:
|
||||
|
||||
m_pRestore = NULL;
|
||||
m_pRestoreStatus = NULL;
|
||||
enableLogging();
|
||||
enableLogging( &uiRflToken);
|
||||
|
||||
pDb->m_uiFlags &= ~FDB_REPLAYING_RFL;
|
||||
|
||||
|
||||
@@ -384,24 +384,25 @@ public:
|
||||
FLMBOOL bCommitting,
|
||||
FLMBOOL bOkToUnlock);
|
||||
|
||||
FINLINE FLMBOOL isLoggingEnabled( void)
|
||||
FINLINE void disableLogging(
|
||||
FLMUINT * puiToken)
|
||||
{
|
||||
return( m_uiDisabledCount ? FALSE : TRUE);
|
||||
*puiToken = ++m_uiDisableCount;
|
||||
}
|
||||
|
||||
FINLINE FLMUINT disableLogging( void)
|
||||
FINLINE void enableLogging(
|
||||
FLMUINT * puiToken)
|
||||
{
|
||||
m_uiDisabledCount++;
|
||||
return( m_uiDisabledCount);
|
||||
flmAssert( m_uiDisableCount);
|
||||
flmAssert( *puiToken && *puiToken == m_uiDisableCount);
|
||||
|
||||
m_uiDisableCount--;
|
||||
*puiToken = 0;
|
||||
}
|
||||
|
||||
FINLINE FLMUINT enableLogging( void)
|
||||
|
||||
FINLINE FLMBOOL isLoggingEnabled( void)
|
||||
{
|
||||
if (m_uiDisabledCount)
|
||||
{
|
||||
m_uiDisabledCount--;
|
||||
}
|
||||
return( m_uiDisabledCount);
|
||||
return( m_uiDisableCount ? FALSE : TRUE);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -629,7 +630,7 @@ private:
|
||||
eLFileType m_eLastLfType; // The Last Lfile Type
|
||||
IXKeyCompare * m_pIxCompareObject;
|
||||
IF_ResultSetCompare * m_pCompareObject;
|
||||
FLMUINT m_uiDisabledCount; // Is logging currently disabled
|
||||
FLMUINT m_uiDisableCount; // Is logging currently disabled
|
||||
|
||||
friend class F_RflOStream;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user