diff --git a/ChangeLog b/ChangeLog index e9342c085..a80a078a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-10-24 Richard Frith-Macdonald + + * Source/NSDistributedNotificationCenter.m: Changed to explicitly + use a socket port name server for network wide notifications. + 2004-10-21 Fred Kiefer * Source/NSPropertyList.m (GSBinaryPLParser objectAtIndex:): diff --git a/Source/NSDistributedNotificationCenter.m b/Source/NSDistributedNotificationCenter.m index b074d33a8..3e539169c 100644 --- a/Source/NSDistributedNotificationCenter.m +++ b/Source/NSDistributedNotificationCenter.m @@ -39,6 +39,7 @@ #include "Foundation/NSDistributedNotificationCenter.h" #include "Foundation/NSUserDefaults.h" #include "Foundation/NSHost.h" +#include "Foundation/NSPortNameServer.h" #include "../Tools/gdnc.h" @@ -616,9 +617,18 @@ static NSDistributedNotificationCenter *netCenter = nil; format: @"Unknown center type - %@", _type]; } - - _remote = RETAIN([NSConnection rootProxyForConnectionWithRegisteredName: - service host: host]); + if ([host isEqualToString: @"*"] == YES) + { + _remote = [NSConnection rootProxyForConnectionWithRegisteredName: + service host: host + usingNameServer: [NSSocketPortNameServer sharedInstance]]; + } + else + { + _remote = [NSConnection rootProxyForConnectionWithRegisteredName: + service host: host]; + } + RETAIN(_remote); if (_type == NSLocalNotificationCenterType && _remote == nil && [host isEqual: @""] == NO)