Added debug logmessages to mbcico ttyio.c
This commit is contained in:
parent
cd0618bc01
commit
dfa5a340a7
@ -4684,6 +4684,7 @@ v0.33.20 10-Feb-2002
|
|||||||
If a binkp session comes in and there already is a session
|
If a binkp session comes in and there already is a session
|
||||||
with that node, mbcico stopts the binkp session with an error.
|
with that node, mbcico stopts the binkp session with an error.
|
||||||
Remove some obsolete code that is handled by mbtask.
|
Remove some obsolete code that is handled by mbtask.
|
||||||
|
Added some debug logmessages in ttyio.
|
||||||
|
|
||||||
mbout:
|
mbout:
|
||||||
The status display has now 9 digits for the outbound size.
|
The status display has now 9 digits for the outbound size.
|
||||||
|
@ -128,8 +128,7 @@ int tty_expired(int tno)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
now = time(NULL);
|
now = time(NULL);
|
||||||
Syslog('T', "ttyio: expired(%d) now=%lu,timer=%lu,return %s",
|
Syslog('T', "ttyio: expired(%d) now=%lu,timer=%lu,return %s", tno,now,timer[tno],(now >= timer[tno])?"yes":"no");
|
||||||
tno,now,timer[tno],(now >= timer[tno])?"yes":"no");
|
|
||||||
return (now >= timer[tno]);
|
return (now >= timer[tno]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,7 +176,8 @@ static int tty_read(char *buf, int size, int tot)
|
|||||||
if (timer[i]) {
|
if (timer[i]) {
|
||||||
if (now >= timer[i]) {
|
if (now >= timer[i]) {
|
||||||
tty_status=STAT_TIMEOUT;
|
tty_status=STAT_TIMEOUT;
|
||||||
Syslog('t', "tty_read: timer %d already expired, return",i);
|
Syslog('-', "tty_read: timer %d already expired, return",i);
|
||||||
|
// Syslog('t', "tty_read: timer %d already expired, return",i);
|
||||||
return -tty_status;
|
return -tty_status;
|
||||||
} else {
|
} else {
|
||||||
if (timeout > (timer[i]-now))
|
if (timeout > (timer[i]-now))
|
||||||
@ -234,8 +234,10 @@ static int tty_read(char *buf, int size, int tot)
|
|||||||
if (hanged_up || (errno == EPIPE) || (errno == ECONNRESET)) {
|
if (hanged_up || (errno == EPIPE) || (errno == ECONNRESET)) {
|
||||||
tty_status = STAT_HANGUP;
|
tty_status = STAT_HANGUP;
|
||||||
WriteError("$tty_read: hanged_up flag");
|
WriteError("$tty_read: hanged_up flag");
|
||||||
} else
|
} else {
|
||||||
tty_status = STAT_ERROR;
|
tty_status = STAT_ERROR;
|
||||||
|
Syslog('-', "tty_read: error flag");
|
||||||
|
}
|
||||||
rc=-tty_status;
|
rc=-tty_status;
|
||||||
} else
|
} else
|
||||||
Syslog('T', "tty_read: %s %d characters", printable(buf, rc), rc);
|
Syslog('T', "tty_read: %s %d characters", printable(buf, rc), rc);
|
||||||
@ -257,8 +259,10 @@ int tty_write(char *buf, int size)
|
|||||||
if (hanged_up || (errno == EPIPE) || (errno == ECONNRESET)) {
|
if (hanged_up || (errno == EPIPE) || (errno == ECONNRESET)) {
|
||||||
tty_status = STAT_HANGUP;
|
tty_status = STAT_HANGUP;
|
||||||
WriteError("$tty_write: hanged_up flag");
|
WriteError("$tty_write: hanged_up flag");
|
||||||
} else
|
} else {
|
||||||
tty_status=STAT_ERROR;
|
tty_status=STAT_ERROR;
|
||||||
|
Syslog('-', "tty_write: error flag");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (tty_status)
|
if (tty_status)
|
||||||
Syslog('t', "tty_write: error %s", ttystat[tty_status]);
|
Syslog('t', "tty_write: error %s", ttystat[tty_status]);
|
||||||
|
Reference in New Issue
Block a user