Try to fix getchar
This commit is contained in:
parent
82e4ba36e5
commit
c28813fd79
8
bbs.c
8
bbs.c
@ -204,7 +204,7 @@ char s_getchar() {
|
|||||||
do {
|
do {
|
||||||
|
|
||||||
if (sshBBS) {
|
if (sshBBS) {
|
||||||
len = read(stdin, &c, 1);
|
c = getchar();
|
||||||
} else {
|
} else {
|
||||||
len = read(gSocket, &c, 1);
|
len = read(gSocket, &c, 1);
|
||||||
}
|
}
|
||||||
@ -236,9 +236,9 @@ char s_getchar() {
|
|||||||
if (c == '\r') {
|
if (c == '\r') {
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
disconnect("Socket Closed");
|
disconnect("Socket Closed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (c == '\n');
|
} while (c == '\n');
|
||||||
usertimeout = 10;
|
usertimeout = 10;
|
||||||
return (char)c;
|
return (char)c;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user