Skip to content

Commit b92b819

Browse files
rename the crypt process thread id variable to its actual purpose as handle
1 parent 178b643 commit b92b819

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/jrd/CryptoManager.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ namespace Jrd {
319319
keyConsumers(getPool()),
320320
hash(getPool()),
321321
dbInfo(FB_NEW DbInfo(this)),
322-
cryptThreadId(0),
322+
cryptThreadHandle(0),
323323
cryptPlugin(NULL),
324324
checkFactory(NULL),
325325
dbb(*tdbb->getDatabase()),
@@ -337,8 +337,8 @@ namespace Jrd {
337337

338338
CryptoManager::~CryptoManager()
339339
{
340-
if (cryptThreadId)
341-
Thread::waitForCompletion(cryptThreadId);
340+
if (cryptThreadHandle)
341+
Thread::waitForCompletion(cryptThreadHandle);
342342

343343
delete stateLock;
344344
delete threadLock;
@@ -925,10 +925,10 @@ namespace Jrd {
925925
void CryptoManager::terminateCryptThread(thread_db*, bool wait)
926926
{
927927
flDown = true;
928-
if (wait && cryptThreadId)
928+
if (wait && cryptThreadHandle)
929929
{
930-
Thread::waitForCompletion(cryptThreadId);
931-
cryptThreadId = 0;
930+
Thread::waitForCompletion(cryptThreadHandle);
931+
cryptThreadHandle = 0;
932932
}
933933
}
934934

@@ -987,7 +987,7 @@ namespace Jrd {
987987

988988
// ready to go
989989
guard.leave(); // release in advance to avoid races with cryptThread()
990-
Thread::start(cryptThreadStatic, (THREAD_ENTRY_PARAM) this, THREAD_medium, &cryptThreadId);
990+
Thread::start(cryptThreadStatic, (THREAD_ENTRY_PARAM) this, THREAD_medium, &cryptThreadHandle);
991991
}
992992
catch (const Firebird::Exception&)
993993
{

src/jrd/CryptoManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ class CryptoManager final : public Firebird::PermanentStorage, public BarSync::I
303303
const char* getPluginName() const;
304304
Thread::Handle getCryptThreadHandle() const
305305
{
306-
return cryptThreadId;
306+
return cryptThreadHandle;
307307
}
308308

309309
private:
@@ -382,7 +382,7 @@ class CryptoManager final : public Firebird::PermanentStorage, public BarSync::I
382382
AttachmentsRefHolder keyProviders, keyConsumers;
383383
Firebird::string hash;
384384
Firebird::RefPtr<DbInfo> dbInfo;
385-
Thread::Handle cryptThreadId;
385+
Thread::Handle cryptThreadHandle;
386386
Firebird::IDbCryptPlugin* cryptPlugin;
387387
Factory* checkFactory;
388388
Database& dbb;

0 commit comments

Comments
 (0)