aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/MCPKit')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h2
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m16
2 files changed, 10 insertions, 8 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h
index bf5d4145..05078a60 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h
@@ -159,7 +159,7 @@
NSString *serverVersionString;
NSMutableDictionary *structure;
- NSMutableSet *allKeysofDbStructure;
+ NSMutableArray *allKeysofDbStructure;
NSTimer *keepAliveTimer;
double lastKeepAliveTime;
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
index c4d41778..26f1a9b4 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
@@ -116,7 +116,7 @@ static BOOL sTruncateLongFieldInLogs = YES;
keepAliveInterval = 60;
structure = [[NSMutableDictionary alloc] initWithCapacity:1];
- allKeysofDbStructure = [[NSMutableSet alloc] initWithCapacity:20];
+ allKeysofDbStructure = [[NSMutableArray alloc] initWithCapacity:20];
isQueryingDbStructure = NO;
connectionThreadId = 0;
@@ -1880,12 +1880,13 @@ void performThreadedKeepAlive(void *ptr)
NSDictionary *dbstructure = [[[self delegate] getDbStructure] retain];
[structure removeAllObjects];
[structure setObject:[NSMutableDictionary dictionaryWithDictionary:dbstructure] forKey:connectionID];
- NSArray *allStructureKeys = [[[self delegate] allSchemaKeys] retain];
+ NSArray *allStructureKeys = [[self delegate] allSchemaKeys];
if(allStructureKeys && [allStructureKeys count]) {
- [allKeysofDbStructure removeAllObjects];
- [allKeysofDbStructure addObjectsFromArray:allStructureKeys];
+ if(allKeysofDbStructure) [allKeysofDbStructure release];
+ allKeysofDbStructure = nil;
+ allKeysofDbStructure = [[NSMutableArray alloc] initWithCapacity:[allKeysofDbStructure count]];
+ [allKeysofDbStructure setArray:allStructureKeys];
}
- if(allStructureKeys) [allStructureKeys release], allStructureKeys = nil;
if(dbstructure) [dbstructure release], dbstructure = nil;
BOOL removeAddFlag = NO;
@@ -2215,8 +2216,9 @@ void performThreadedKeepAlive(void *ptr)
*/
- (NSArray *)getAllKeysOfDbStructure
{
- if(allKeysofDbStructure && [allKeysofDbStructure count])
- return [allKeysofDbStructure allObjects];
+ if(allKeysofDbStructure && [allKeysofDbStructure count]) {
+ return [NSArray arrayWithArray:allKeysofDbStructure];
+ }
return [NSArray array];
}