From a5b85d72bca6e77611b63d7fc3bbe5cd4d66f070 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 27 Apr 2022 13:56:56 -0400 Subject: [PATCH] fix(addressbook): close DB connection after LDIF import Fixes #5507 --- UI/Contacts/UIxContactFolderActions.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/UI/Contacts/UIxContactFolderActions.m b/UI/Contacts/UIxContactFolderActions.m index bd5a5ef6b..b107b7e64 100644 --- a/UI/Contacts/UIxContactFolderActions.m +++ b/UI/Contacts/UIxContactFolderActions.m @@ -165,6 +165,8 @@ static NSArray *photoTags = nil; NSMutableDictionary *entry, *encodedEntry; SOGoContactLDIFEntry *ldifEntry; NSArray *ldifContacts, *lines; + EOAdaptorChannel *channel; + GCSFolder *gcsFolder; SOGoContactGCSFolder *folder; NSEnumerator *keyEnumerator; NSString *key, *uid, *line; @@ -317,7 +319,10 @@ static NSArray *photoTags = nil; } // Force update of quick table - [[[[[self clientObject] ocsFolder] acquireQuickChannel] adaptorContext] commitTransaction]; + gcsFolder = [folder ocsFolder]; + channel = [gcsFolder acquireQuickChannel]; + [[channel adaptorContext] commitTransaction]; + [gcsFolder releaseChannel: channel]; // Convert groups to vLists count = [ldifListEntries count];