mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-21 19:01:16 +00:00
try to improve host name matching
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@35718 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b60a666bf4
commit
8a6842b7b9
3 changed files with 22 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
|||
2012-10-18 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* EcProcess.m: Remove unused variable.
|
||||
* EcControl.m: Yse -hostWithWellKnownName: in preference to
|
||||
-hostWithName: when trying to find/match hosts.
|
||||
|
||||
2012-10-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
Initial (1.0) release.
|
||||
|
|
14
EcControl.m
14
EcControl.m
|
@ -1774,8 +1774,12 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
|
|||
[(NSDistantObject*)c setProtocolForProxy: @protocol(Command)];
|
||||
dict = [NSMutableDictionary dictionaryWithCapacity: 3];
|
||||
|
||||
h = [NSHost hostWithWellKnownName: n];
|
||||
if (nil == h)
|
||||
{
|
||||
h = [NSHost hostWithName: n];
|
||||
if (h == nil)
|
||||
}
|
||||
if (nil == h)
|
||||
{
|
||||
m = [NSString stringWithFormat:
|
||||
@"Rejected new host with bad name '%@' at %@\n", n, [NSDate date]];
|
||||
|
@ -2462,9 +2466,13 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
|
|||
hostKey = [NSHost currentHost];
|
||||
}
|
||||
else
|
||||
{
|
||||
hostKey = [NSHost hostWithWellKnownName: o];
|
||||
if (nil == hostKey)
|
||||
{
|
||||
hostKey = [NSHost hostWithName: o];
|
||||
}
|
||||
}
|
||||
if (hostKey == nil)
|
||||
{
|
||||
NSString *e;
|
||||
|
@ -2536,7 +2544,11 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
|
|||
{
|
||||
[dict setObject: o forKey: @"*"];
|
||||
}
|
||||
h = [NSHost hostWithWellKnownName: [c name]];
|
||||
if (nil == h)
|
||||
{
|
||||
h = [NSHost hostWithName: [c name]];
|
||||
}
|
||||
o = [config objectForKey: h];
|
||||
if (o != nil)
|
||||
{
|
||||
|
|
|
@ -104,7 +104,6 @@ static NSRecursiveLock *ecLock = nil;
|
|||
|
||||
static BOOL cmdFlagDaemon = NO;
|
||||
static BOOL cmdFlagTesting = NO;
|
||||
static BOOL cmdIsInitialised = NO;
|
||||
static BOOL cmdIsQuitting = NO;
|
||||
static NSString *cmdInst = nil;
|
||||
static NSString *cmdName = nil;
|
||||
|
@ -2913,7 +2912,6 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
|||
if (self == EcProc)
|
||||
{
|
||||
EcProc = nil;
|
||||
cmdIsInitialised = NO;
|
||||
}
|
||||
[ecLock unlock];
|
||||
[super dealloc];
|
||||
|
|
Loading…
Reference in a new issue