Update idlemax from 1500 to 500.

Update ioucon.
This commit is contained in:
grossmj 2014-03-24 21:25:12 -06:00
parent c4d9e8371f
commit f534a02324
3 changed files with 10 additions and 9 deletions

View File

@ -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

View File

@ -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))

View File

@ -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