MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / detach

Method detach

src/jrd/CryptoManager.cpp:892–921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

890 }
891
892 void CryptoManager::detach(thread_db* tdbb, Attachment* att)
893 {
894 if (!checkFactory)
895 return;
896
897 MutexLockGuard g(holdersMutex, FB_FUNCTION);
898 for (AttachmentsRefHolder::Iterator iter(keyConsumers); *iter; ++iter)
899 {
900 StableAttachmentPart* const sAtt = *iter;
901
902 if (sAtt->getHandle() == att)
903 {
904 iter.remove();
905 return;
906 }
907 }
908
909 for (AttachmentsRefHolder::Iterator iter(keyProviders); *iter; ++iter)
910 {
911 StableAttachmentPart* const sAtt = *iter;
912
913 if (sAtt->getHandle() == att)
914 {
915 iter.remove();
916 if (!keyProviders.hasData())
917 shutdownConsumers(tdbb);
918 return;
919 }
920 }
921 }
922
923 void CryptoManager::terminateCryptThread(thread_db*, bool wait)
924 {

Callers

nothing calls this directly

Calls 3

getHandleMethod · 0.45
removeMethod · 0.45
hasDataMethod · 0.45

Tested by

no test coverage detected