From cbc73abcf683b3576c6900f3022b0e896d4bce68 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Fri, 5 Apr 2013 09:56:18 +0000 Subject: [PATCH] fix DRA-14441 git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@36466 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ EcCommand.m | 5 +++-- EcControl.m | 20 +++++++++----------- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0d27692..764e3cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,15 @@ +2013-04-05 Richard Frith-Macdonald + + * EcControl.m: Fix to get 'control on ...' to work while + connected to a specific server. + 2013-03-22: Niels Grewe + * EcControl.m: Fix bug that could remove a alerter when it was still needed. 2013-03-18: Niels Grewe + * EcAlerter.h * EcAlerter.m: Rearrange and expose a few methods so that subclasses can diff --git a/EcCommand.m b/EcCommand.m index 9aff3b3..6714720 100644 --- a/EcCommand.m +++ b/EcCommand.m @@ -1099,8 +1099,9 @@ static NSString* cmdWord(NSArray* a, unsigned int pos) { NSString *m; - m = cmdLogFormat(LT_ERROR, @"command to unregistered client"); - [self information: m + m = [NSString stringWithFormat: + @"command to unregistered client '%@'", t]; + [self information: cmdLogFormat(LT_ERROR, m) from: nil to: f type: LT_ERROR]; diff --git a/EcControl.m b/EcControl.m index cbede8f..7fe74bf 100644 --- a/EcControl.m +++ b/EcControl.m @@ -592,9 +592,8 @@ static NSString* cmdWord(NSArray* a, unsigned int pos) { connected = YES; } - /* - * If we have a 'control' command - act as if the console was not - * connected to a host or server. + /* If we have a 'control' command - act as if the console was not + * connected to a host or server. */ if (comp(wd, @"control") == 0) { @@ -694,9 +693,8 @@ static NSString* cmdWord(NSArray* a, unsigned int pos) { NSArray *hosts; - /* - * Make an array of hosts to work with - the connected host - * or all hosts. If the connected host has gone away - disconnect. + /* Make an array of hosts to work with - the connected host + * or all hosts. If the connected host has gone away - disconnect. */ if (hname == nil) { @@ -734,10 +732,10 @@ static NSString* cmdWord(NSArray* a, unsigned int pos) BOOL foundServer = NO; int i; - m = nil; /* Let connected host generate messages. */ - /* - * Perform operation on connected host (or all hosts if - * not connected to a host). + m = nil; /* Let remote host generate messages. */ + + /* Perform operation on connected host (or all hosts if + * not connected to a host). */ for (i = 0; i < [hosts count]; i++) { @@ -745,7 +743,7 @@ static NSString* cmdWord(NSArray* a, unsigned int pos) if ([commands indexOfObjectIdenticalTo: c] != NSNotFound) { - if ([console cserv] == nil) + if (NO == connected || [console cserv] == nil) { foundServer = YES; NS_DURING