1
0
mirror of https://github.com/rcornwell/sims.git synced 2026-01-27 12:32:03 +00:00

KA10: Close TMXR line when TEN11 connection goes away.

This commit is contained in:
Lars Brinkhoff
2019-03-10 15:12:45 -04:00
committed by Richard Cornwell
parent 78a8b3ab25
commit a15f42686e
2 changed files with 14 additions and 2 deletions

View File

@@ -1675,7 +1675,7 @@ int Mem_read_its(int flag, int cur_context, int fetch) {
sim_interval--;
if (!page_lookup_its(AB, flag, &addr, 0, cur_context, fetch))
return 1;
if (QTEN11 && T11RANGE(addr)) {
if (T11RANGE(addr) && QTEN11) {
if (ten11_read (addr, &MB)) {
nxm_flag = 1;
return 1;
@@ -1709,7 +1709,7 @@ int Mem_write_its(int flag, int cur_context) {
sim_interval--;
if (!page_lookup_its(AB, flag, &addr, 1, cur_context, 0))
return 1;
if (QTEN11 && T11RANGE(addr)) {
if (T11RANGE(addr) && QTEN11) {
if (ten11_write (addr, MB)) {
nxm_flag = 1;
return 1;

View File

@@ -34,7 +34,11 @@
#include <netinet/tcp.h>
#include <arpa/inet.h>
#ifndef NUM_DEVS_TEN11
#define NUM_DEVS_TEN11 0
#endif
#if (NUM_DEVS_TEN11 > 0)
/* Rubin 10-11 pager. */
static uint64 ten11_pager[256];
@@ -170,6 +174,11 @@ static void build (unsigned char *request, unsigned char octet)
static t_stat ten11_svc (UNIT *uptr)
{
tmxr_poll_rx (&ten11_desc);
if (ten11_ldsc.rcve && !ten11_ldsc.conn) {
ten11_ldsc.rcve = 0;
tmxr_reset_ln (&ten11_ldsc);
}
if (tmxr_poll_conn(&ten11_desc) >= 0) {
sim_debug(DBG_CMD, &ten11_dev, "got connection\n");
ten11_ldsc.rcve = 1;
@@ -208,6 +217,8 @@ static int error (const char *message)
{
sim_debug (DBG_TRC, &ten11_dev, "%s\r\n", message);
sim_debug (DBG_TRC, &ten11_dev, "CLOSE\r\n");
ten11_ldsc.rcve = 0;
tmxr_reset_ln (&ten11_ldsc);
return -1;
}
@@ -403,3 +414,4 @@ int ten11_write (int addr, uint64 data)
}
return 0;
}
#endif