Ticket #3696: wide-area-bonjour-web.patch

File wide-area-bonjour-web.patch, 844 bytes (added by gck, 11 years ago)

Patch to register Web Interface on all Bonjour domains, including any WAB.

  • macosx/BonjourController.m

    diff -uNr Transmission-orig/macosx/BonjourController.m Transmission-patched/macosx/BonjourController.m
    old new  
    4545    [self stop];
    4646   
    4747    NSString * serviceName = [NSString stringWithFormat: @"Transmission Web Interface (%@)", NSUserName()];
    48    
    49     fService = [[NSNetService alloc] initWithDomain: @"local." type: @"_http._tcp." name: serviceName port: port];
     48
     49    BOOL localOnly = NO; // set to yes, and it will only be published on the local domain
     50    fService = [[NSNetService alloc] initWithDomain: (localOnly ? @"local." : @"") type: @"_http._tcp." name: serviceName port: port];
    5051    [fService setDelegate: self];
    5152   
    5253    [fService publish];