Revision: 21838
          http://sourceforge.net/p/bibdesk/svn/21838
Author:   hofman
Date:     2018-02-07 19:43:44 +0000 (Wed, 07 Feb 2018)
Log Message:
-----------
Don't try to get pubs from sharing server when the client is invalidated. 
Invalidate the client when the server does not accept it.

Modified Paths:
--------------
    trunk/bibdesk/BDSKSharingClient.m
    trunk/bibdesk/BDSKSharingServer.m

Modified: trunk/bibdesk/BDSKSharingClient.m
===================================================================
--- trunk/bibdesk/BDSKSharingClient.m   2018-02-07 19:31:02 UTC (rev 21837)
+++ trunk/bibdesk/BDSKSharingClient.m   2018-02-07 19:43:44 UTC (rev 21838)
@@ -457,8 +457,11 @@
     
     @try {
         NSDictionary *archive = nil;
-        NSData *proxyData = [[self remoteServer] 
archivedSnapshotOfPublications];
+        id<BDSKSharingServer>server = [self remoteServer];
+        NSData *proxyData = nil;
         
+        if (uniqueIdentifier)
+            proxyData = [server archivedSnapshotOfPublications];
         if([proxyData length] != 0){
             if([proxyData mightBeCompressed])
                 proxyData = [proxyData decompressedData];

Modified: trunk/bibdesk/BDSKSharingServer.m
===================================================================
--- trunk/bibdesk/BDSKSharingServer.m   2018-02-07 19:31:02 UTC (rev 21837)
+++ trunk/bibdesk/BDSKSharingServer.m   2018-02-07 19:43:44 UTC (rev 21838)
@@ -697,8 +697,10 @@
     
     // we don't register clients that have a version we don't support
     // version is [BDSKSharingClientServer supportedProtocolVersion] from the 
client
-    if([version numericCompare:[BDSKSharingDOServer requiredProtocolVersion]] 
== NSOrderedAscending)
+    if([version numericCompare:[BDSKSharingDOServer requiredProtocolVersion]] 
== NSOrderedAscending){
+        [clientObject invalidate];
         return;
+    }
     
     [clientObject setProtocolForProxy:@protocol(BDSKSharingClient)];
     [remoteClients setObject:clientObject forKey:identifier];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to