fix(addressbook): close DB connection after LDIF import

Fixes #5507
This commit is contained in:
Francis Lachapelle
2022-04-27 13:56:56 -04:00
parent 8a0c46ded2
commit a5b85d72bc

View File

@@ -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];