ia64/xen-unstable

changeset 1894:a66ccef56a68

bitkeeper revision 1.1108.1.18 (410132d727sJm8mjzG0hN7Txe_COkg)

Fix problem where a failed console connect terminates an existing
console connection.
author mjw@wray-m-3.hpl.hp.com
date Fri Jul 23 15:46:31 2004 +0000 (2004-07-23)
parents a50fb088d983
children fbcefe1a0285
files tools/python/xen/xend/server/console.py
line diff
     1.1 --- a/tools/python/xen/xend/server/console.py	Fri Jul 23 15:38:32 2004 +0000
     1.2 +++ b/tools/python/xen/xend/server/console.py	Fri Jul 23 15:46:31 2004 +0000
     1.3 @@ -57,7 +57,7 @@ class ConsoleProtocol(protocol.Protocol)
     1.4                   self.idx, str(self.addr[0]), str(self.addr[1]))
     1.5          eserver.inject('xend.console.disconnect',
     1.6                         [self.idx, self.addr[0], self.addr[1]])
     1.7 -        self.controller.disconnect()
     1.8 +        self.controller.disconnect(conn=self)
     1.9  
    1.10      def loseConnection(self):
    1.11          self.transport.loseConnection()
    1.12 @@ -211,9 +211,10 @@ class ConsoleController(controller.Contr
    1.13          self.handleOutput()
    1.14          return 0
    1.15  
    1.16 -    def disconnect(self):
    1.17 +    def disconnect(self, conn=None):
    1.18          """Disconnect the TCP connection to the console.
    1.19          """
    1.20 +        if conn and conn != self.conn: return
    1.21          if self.conn:
    1.22              self.conn.loseConnection()
    1.23          self.addr = None