See ChangeLog

Monotone-Parent: 7cc314736d305ee7778315690bd8d1f0c506bef8
Monotone-Revision: d57d280e1a2c1d6903ab6e6d025a777f3c5e15f2

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2009-03-20T22:24:31
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2009-03-20 22:24:31 +00:00
parent 007d1a966a
commit 2e58aba46d
3 changed files with 20 additions and 5 deletions
+6
View File
@@ -1,3 +1,9 @@
2009-03-20 Ludovic Marcotte <lmarcotte@inverse.ca>
* SoObjects/SOGo/SOGoUserDefaults.{h,m}
We are now way quicker to react when the database
is down.
2009-03-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Contacts/UIxContactFoldersView.m ([UIxContactFoldersView
+1
View File
@@ -50,6 +50,7 @@
{
int modified: 1;
int isNew: 1;
int ready: 1;
} defFlags;
}
+13 -5
View File
@@ -115,6 +115,7 @@ static NSString *uidColumnName = @"c_uid";
if (channel)
{
/* generate SQL */
defFlags.ready = YES;
sql = [NSString stringWithFormat: (@"SELECT %@"
@" FROM %@"
@" WHERE %@ = '%@'"),
@@ -164,8 +165,11 @@ static NSString *uidColumnName = @"c_uid";
[cm releaseChannel:channel];
}
else
[self errorWithFormat:@"failed to acquire channel for URL: %@",
[self tableURL]];
{
defFlags.ready = NO;
[self errorWithFormat:@"failed to acquire channel for URL: %@",
[self tableURL]];
}
return rc;
}
@@ -255,6 +259,7 @@ static NSString *uidColumnName = @"c_uid";
channel = [cm acquireOpenChannelForURL: [self tableURL]];
if (channel)
{
defFlags.ready = YES;
[[channel adaptorContext] beginTransaction];
ex = [channel evaluateExpressionX:sql];
if (ex)
@@ -276,8 +281,11 @@ static NSString *uidColumnName = @"c_uid";
[cm releaseChannel: channel];
}
else
[self errorWithFormat: @"failed to acquire channel for URL: %@",
[self tableURL]];
{
defFlags.ready = NO;
[self errorWithFormat: @"failed to acquire channel for URL: %@",
[self tableURL]];
}
}
else
[self errorWithFormat: @"failed to generate SQL for storing defaults"];
@@ -376,7 +384,7 @@ static NSString *uidColumnName = @"c_uid";
{
id value;
if (![self fetchProfile])
if (!defFlags.ready || ![self fetchProfile])
value = nil;
else
value = [values objectForKey: key];