Revision: 27912
http://sourceforge.net/p/bibdesk/svn/27912
Author: hofman
Date: 2022-09-20 09:39:33 +0000 (Tue, 20 Sep 2022)
Log Message:
-----------
reset connection only when searching something, make sure connection is created
when nil, don't copy serverInfo twice
Modified Paths:
--------------
trunk/bibdesk/BDSKZoomGroupServer.h
trunk/bibdesk/BDSKZoomGroupServer.m
Modified: trunk/bibdesk/BDSKZoomGroupServer.h
===================================================================
--- trunk/bibdesk/BDSKZoomGroupServer.h 2022-09-20 09:30:28 UTC (rev 27911)
+++ trunk/bibdesk/BDSKZoomGroupServer.h 2022-09-20 09:39:33 UTC (rev 27912)
@@ -64,6 +64,5 @@
}
+ (NSArray *)supportedRecordSyntaxes;
+ (ZOOMSyntaxType)zoomRecordSyntaxForRecordSyntaxString:(NSString *)syntax;
-- (void)resetConnection;
@property (nonatomic, retain) NSString *errorMessage;
@end
Modified: trunk/bibdesk/BDSKZoomGroupServer.m
===================================================================
--- trunk/bibdesk/BDSKZoomGroupServer.m 2022-09-20 09:30:28 UTC (rev 27911)
+++ trunk/bibdesk/BDSKZoomGroupServer.m 2022-09-20 09:39:33 UTC (rev 27912)
@@ -251,10 +251,8 @@
#pragma mark Server thread
-- (void)resetConnection;
+- (void)resetConnectionWithInfo:(BDSKServerInfo *)info;
{
- BDSKServerInfo *info = [self serverInfo];
-
BDSKASSERT([info host] != nil);
BDSKDESTROY(connection);
@@ -291,10 +289,6 @@
- (void)downloadWithSearchTerm:(NSString *)searchTerm;
{
- // only reset the connection when we're actually going to use it, since a
mixed host/database/port won't work
- if (atomic_load(&flags.needsReset))
- [self resetConnection];
-
NSMutableArray *results = nil;
if (NO == [NSString isEmptyString:searchTerm]){
@@ -301,6 +295,10 @@
BDSKServerInfo *info = [self serverInfo];
+ // only reset the connection when we're actually going to use it,
since a mixed host/database/port won't work
+ if (atomic_load(&flags.needsReset) || connection == nil)
+ [self resetConnectionWithInfo:info];
+
if ([info removeDiacritics]) {
CFMutableStringRef mutableCopy = (CFMutableStringRef)[[searchTerm
mutableCopy] autorelease];
CFStringNormalize(mutableCopy, kCFStringNormalizationFormD);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit