Ignore:
Timestamp:
Dec 21, 2009, 1:11:35 AM (15 years ago)
Author:
broder
Message:

Allow reconnecting to the same terminal session

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/ajaxterm-rebased/code/main.py

    r2752 r2753  
    408408
    409409        @cherrypy.expose
    410         def at(self, machine_id, k=None, c=0):
     410        def at(self, machine_id, k=None, c=0, force=0):
    411411            machine = validation.Validate(cherrypy.request.login, cherrypy.request.state, machine_id=machine_id).machine
    412412            if machine_id in self.atsessions:
     
    420420                self.atmulti.proc_write(term,k)
    421421            time.sleep(0.002)
    422             dump=self.atmulti.dump(term,c)
     422            dump=self.atmulti.dump(term,c,int(force))
    423423            cherrypy.response.headers['Content-Type']='text/xml'
    424424            if isinstance(dump,str):
    425425                return dump
    426426            else:
     427                print "Removing session for", machine_id
    427428                del self.atsessions[machine_id]
    428429                return '<?xml version="1.0"?><idem></idem>'
Note: See TracChangeset for help on using the changeset viewer.