mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-07 04:47:14 +00:00
fix(addressbook): close DB connection after DAV query
This commit is contained in:
1 parent
7c81e3acec
commit
348a79c795
4 files changed
+24
-7
No files matched your search
@@ -440,6 +440,17 @@
|
||||
return channel;
|
||||
}
|
||||
|
||||
- (void) releaseConnection: (id) connection
|
||||
{
|
||||
GCSChannelManager *cm;
|
||||
|
||||
if (connection)
|
||||
{
|
||||
cm = [GCSChannelManager defaultChannelManager];
|
||||
[cm releaseChannel: connection];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSDictionary *) _lookupContactEntry: (NSString *) theID
|
||||
considerEmail: (BOOL) b
|
||||
inDomain: (NSString *) domain
|
||||
@@ -678,18 +689,16 @@
|
||||
inDomain: (NSString *) domain
|
||||
{
|
||||
EOAdaptorChannel *channel;
|
||||
GCSChannelManager *cm;
|
||||
NSDictionary *response;
|
||||
|
||||
cm = [GCSChannelManager defaultChannelManager];
|
||||
channel = (EOAdaptorChannel *)[self connection];
|
||||
|
||||
response = [self _lookupContactEntry: theID
|
||||
considerEmail: b
|
||||
inDomain: domain
|
||||
usingConnection: channel];
|
||||
if (channel)
|
||||
[cm releaseChannel: channel];
|
||||
|
||||
[self releaseConnection: channel];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user