Fix for when default nameserver is host-local.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20254 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2004-10-24 06:13:24 +00:00
parent e81b213d74
commit 612ef8a1d5
2 changed files with 18 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2004-10-24 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSDistributedNotificationCenter.m: Changed to explicitly
use a socket port name server for network wide notifications.
2004-10-21 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSPropertyList.m (GSBinaryPLParser objectAtIndex:):

View file

@ -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)