From b55806017ab45768b2e8f6945b70bfb6fdb580ad Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Mon, 26 Aug 2013 23:57:11 -0700 Subject: [PATCH] Check for `Connected` in checkListening() --- mininet/node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mininet/node.py b/mininet/node.py index 895c731..3d6dc0e 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -1143,7 +1143,7 @@ class Controller( Node ): "installed." ) listening = self.cmd( "echo A | telnet -e A %s %d" % ( self.ip, self.port ) ) - if 'Unable' not in listening: + if 'Connected' in listening: servers = self.cmd( 'netstat -atp' ).split( '\n' ) pstr = ':%d ' % self.port clist = servers[ 0:1 ] + [ s for s in servers if pstr in s ] @@ -1238,7 +1238,7 @@ class RemoteController( Controller ): "Warn if remote controller is not accessible" listening = self.cmd( "echo A | telnet -e A %s %d" % ( self.ip, self.port ) ) - if 'Unable' in listening: + if 'Connected' not in listening: warn( "Unable to contact the remote controller" " at %s:%d\n" % ( self.ip, self.port ) )