Revision: 29710
          http://sourceforge.net/p/bibdesk/svn/29710
Author:   hofman
Date:     2025-10-12 09:30:02 +0000 (Sun, 12 Oct 2025)
Log Message:
-----------
don't keep separate ivar for sharingName as it is always the same as the 
netService name

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

Modified: trunk/bibdesk/BDSKSharingServer.h
===================================================================
--- trunk/bibdesk/BDSKSharingServer.h   2025-10-12 08:58:33 UTC (rev 29709)
+++ trunk/bibdesk/BDSKSharingServer.h   2025-10-12 09:30:02 UTC (rev 29710)
@@ -80,7 +80,6 @@
 @interface BDSKSharingServer : NSObject <NSNetServiceDelegate> {    
     NSNetService *netService;
     BDSKAsyncSharingServer *asyncServer;
-    NSString *sharingName;
     int socketDescriptor;
     BDSKSharingStatus status;
     NSInteger tryCount;

Modified: trunk/bibdesk/BDSKSharingServer.m
===================================================================
--- trunk/bibdesk/BDSKSharingServer.m   2025-10-12 08:58:33 UTC (rev 29709)
+++ trunk/bibdesk/BDSKSharingServer.m   2025-10-12 09:30:02 UTC (rev 29710)
@@ -150,7 +150,6 @@
 
 @interface BDSKSharingServer ()
 
-@property (nonatomic, strong) NSString *sharingName;
 @property (nonatomic) BDSKSharingStatus status;
 
 @end
@@ -240,11 +239,13 @@
     return self;
 }
 
+- (NSString *)sharingName {
+    return [netService name];
+}
+
 - (void)setStatus:(BDSKSharingStatus)newStatus {
     if (status != newStatus) {
         status = newStatus;
-        if (status == BDSKSharingStatusOff)
-            [self setSharingName:nil];
         [[NSNotificationCenter defaultCenter] 
postNotificationName:BDSKSharingStatusChangedNotification object:nil];
     }
 }
@@ -417,8 +418,6 @@
     BDSKPOSTCONDITION(netService != nil);
     
     if (netService) {
-        [self setSharingName:aSharingName];
-        
         // our DO server will also use Bonjour, but this gives us a browseable 
name
         [netService publishWithOptions:NSNetServiceNoAutoRename];
         

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

Reply via email to