Move check for alternative name

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13064 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fedor 2002-03-09 20:23:13 +00:00
parent 670ea74e39
commit 33d0a29ccd
2 changed files with 13 additions and 8 deletions

View file

@ -1,3 +1,8 @@
Sat Mar 9 15:21:04 2002 Adam Fedor <fedor@yogi.doc.com>
* Source/NSDistributedNotificationCenter.m (-_connect): Move check
for alternative name so we can get registered.
2002-03-09 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSDistributedNotificationCentre.m: Try alternative name for

View file

@ -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)
{
@ -399,16 +405,10 @@ 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);
}
}
}