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

@ -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];
}
}
}