mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-19 21:07:57 +00:00
Update idlemax from 1500 to 500.
Update ioucon.
This commit is contained in:
parent
c4d9e8371f
commit
f534a02324
@ -76,7 +76,7 @@ class Router(object):
|
||||
self._sparsemem = True
|
||||
self._clock_divisor = 8
|
||||
self._idlepc = ""
|
||||
self._idlemax = 1500
|
||||
self._idlemax = 500
|
||||
self._idlesleep = 30
|
||||
self._ghost_file = ""
|
||||
self._ghost_status = 0
|
||||
|
@ -61,10 +61,9 @@ class IOU(IModule):
|
||||
break
|
||||
|
||||
if not self._iouyap or not os.path.exists(self._iouyap):
|
||||
raise IOUError("iouyap binary couldn't be found!")
|
||||
|
||||
if not os.access(self._iouyap, os.X_OK):
|
||||
raise IOUError("iouyap is not executable")
|
||||
log.warning("iouyap binary couldn't be found!")
|
||||
elif not os.access(self._iouyap, os.X_OK):
|
||||
log.warning("iouyap is not executable")
|
||||
|
||||
# a new process start when calling IModule
|
||||
IModule.__init__(self, name, *args, **kwargs)
|
||||
@ -185,6 +184,10 @@ class IOU(IModule):
|
||||
except EnvironmentError as e:
|
||||
raise IOUError("Could not save iourc file to {}: {}".format(f.name, e))
|
||||
|
||||
if "iouyap" in request and request["iouyap"]:
|
||||
self._iouyap = request["iouyap"]
|
||||
log.info("iouyap path set to {}".format(self._iouyap))
|
||||
|
||||
if "working_dir" in request and self._working_dir != request["working_dir"]:
|
||||
self._working_dir = request["working_dir"]
|
||||
log.info("this server is local with working directory path to {}".format(self._working_dir))
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2014 GNS3 Technologies Inc.
|
||||
# Copyright (C) 2013, 2014 James E. Carpenter
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -16,8 +16,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Contribution from James Carpenter
|
||||
#
|
||||
|
||||
import socket
|
||||
import sys
|
||||
@ -613,7 +611,7 @@ def start_ioucon(cmdline_args, stop_event):
|
||||
with IOU(ttyC, ttyS, stop_event) as router:
|
||||
send_recv_loop(console, router, b'', stop_event)
|
||||
else:
|
||||
with TTY() as console, IOU(ttyC, ttyS, stop_event) as router:
|
||||
with IOU(ttyC, ttyS, stop_event) as router, TTY() as console:
|
||||
send_recv_loop(console, router, esc_char, stop_event)
|
||||
except ConnectionRefusedError:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user