Skip to content

Commit c34997f

Browse files
committed
Fixed assertion - thanks to Adriano
1 parent 62fa8f2 commit c34997f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/jrd/extds/ExtDS.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,8 @@ Connection* Provider::getBoundConnection(Jrd::thread_db* tdbb,
423423
continue;
424424
#endif
425425

426-
conn->resetRedirect(att->att_crypt_callback);
426+
if (!isCurrentAtt)
427+
conn->resetRedirect(att->att_crypt_callback);
427428
return conn;
428429
}
429430
} while (acc.getNext());
@@ -2689,11 +2690,12 @@ void CryptCallbackRedirector::resetRedirect(Firebird::ICryptKeyCallback* newCall
26892690
{
26902691
#ifdef DEV_BUILD
26912692
CryptHash ch(newCallback);
2692-
fb_assert(isValid() && ch.isValid());
2693+
fb_assert(m_hash.isValid() == ch.isValid());
26932694
fb_assert(m_hash == ch);
26942695
#endif
26952696

2696-
m_keyCallback = newCallback;
2697+
if (m_hash.isValid())
2698+
m_keyCallback = newCallback;
26972699
}
26982700

26992701
bool CryptCallbackRedirector::operator==(const CryptHash& ch) const

0 commit comments

Comments
 (0)