diff --git a/ChangeLog b/ChangeLog index 7e1629a75..cc8d925ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Mar 9 15:21:04 2002 Adam Fedor + + * Source/NSDistributedNotificationCenter.m (-_connect): Move check + for alternative name so we can get registered. + 2002-03-09 Richard Frith-Macdonald * Source/NSDistributedNotificationCentre.m: Try alternative name for diff --git a/Source/NSDistributedNotificationCenter.m b/Source/NSDistributedNotificationCenter.m index 70daf62b0..453929e1e 100644 --- a/Source/NSDistributedNotificationCenter.m +++ b/Source/NSDistributedNotificationCenter.m @@ -347,6 +347,12 @@ static NSDistributedNotificationCenter *defCenter = nil; } _remote = RETAIN([NSConnection rootProxyForConnectionWithRegisteredName: GDNC_SERVICE host: host]); + if (_remote == nil && [host isEqual: @""] == NO) + { + _remote = [NSConnection rootProxyForConnectionWithRegisteredName: + [GDNC_SERVICE stringByAppendingFormat: @"-%@", host] host: @"*"]; + RETAIN(_remote); + } if (_remote != nil) { @@ -400,14 +406,8 @@ NSLog(@"Connection to GDNC server established.\n"); } else { - _remote = [NSConnection rootProxyForConnectionWithRegisteredName: - [GDNC_SERVICE stringByAppendingFormat: @"-%@", host] host: @"*"]; - if (_remote == nil) - { - [NSException raise: NSInternalInconsistencyException - format: @"unable to contact GDNC server for %@", host]; - } - RETAIN(_remote); + [NSException raise: NSInternalInconsistencyException + format: @"unable to contact GDNC server for %@", host]; } } }