Add more logging for connection of Command server to Control server

This commit is contained in:
Richard Frith-Macdonald 2023-04-04 11:38:56 +01:00
parent c05b210840
commit e6e8bafc39
2 changed files with 36 additions and 6 deletions

View file

@ -5515,6 +5515,10 @@ NSLog(@"Problem %@", localException);
rootProxyForConnectionWithRegisteredName: ctlName
host: ctlHost
usingNameServer: [NSSocketPortNameServer sharedInstance] ];
if (nil == control)
{
NSLog(@"Connecting to Control server: faled");
}
}
NS_HANDLER
{
@ -5548,6 +5552,8 @@ NSLog(@"Problem %@", localException);
{
// Control server not yet ready.
DESTROY(control);
NSLog(@"Registering %@ with Control server: not ready yet",
host);
}
else
{
@ -5561,6 +5567,7 @@ NSLog(@"Problem %@", localException);
if ([conf objectForKey: @"rejected"] == nil)
{
[self updateConfig: dat];
NSLog(@"Registered %@ with Control server", host);
}
else
{

View file

@ -1455,8 +1455,13 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
if ([wd length] > 0 && comp(wd, @"self") == 0)
{
[sink setMonitor: nil];
[alerter shutdown];
DESTROY(alerter);
if (alerter)
{
[alerter shutdown];
NSLog(@"Uninstalled alerter: %@",
NSStringFromClass([alerter class]));
DESTROY(alerter);
}
exit(0);
}
}
@ -1816,8 +1821,13 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
- (void) dealloc
{
[sink setMonitor: nil];
[alerter shutdown];
DESTROY(alerter);
if (alerter)
{
[alerter shutdown];
NSLog(@"Uninstalled alerter: %@",
NSStringFromClass([alerter class]));
DESTROY(alerter);
}
[self cmdLogEnd: logname];
if (timer != nil)
{
@ -2147,6 +2157,13 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
[self update]; // Regenerate info from Control.plist
if (nil == alerter)
{
m = [NSString stringWithFormat:
@"Rejected new host '%@' (not ready yet; no alerter) at %@\n",
n, [NSDate date]];
[self information: m
type: LT_CONSOLE
to: nil
from: nil];
return nil; // Not fully configured yet
}
}
@ -3470,12 +3487,18 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
else if ([alerter class] != alerterClass)
{
[sink setMonitor: nil];
[alerter shutdown];
DESTROY(alerter);
if (alerter)
{
[alerter shutdown];
NSLog(@"Uninstalled alerter: %@",
NSStringFromClass([alerter class]));
DESTROY(alerter);
}
}
if (nil == alerter)
{
alerter = [alerterClass new];
NSLog(@"Installed alerter: %@", NSStringFromClass([alerter class]));
}
/* An alerter which confrms to the correct protocol is assumed to