revert some changes
This commit is contained in:
parent
aa21b714e5
commit
ec747992a4
20
src/bbs.c
20
src/bbs.c
@ -262,7 +262,7 @@ void s_putchar(char c) {
|
||||
if (sshBBS) {
|
||||
putchar(c);
|
||||
} else {
|
||||
ret = send(gSocket, &c, 1, MSG_DONTWAIT);
|
||||
ret = send(gSocket, &c, 1, 0);
|
||||
if (ret == -1) {
|
||||
if (errno == ECONNRESET) {
|
||||
disconnect("Disconnected");
|
||||
@ -283,7 +283,7 @@ void s_putchar(char c) {
|
||||
if (sshBBS) {
|
||||
fprintf(stdout, "%s", ptr1);
|
||||
} else {
|
||||
ret = send(gSocket, ptr1, outbuf - ptr1, MSG_DONTWAIT);
|
||||
ret = send(gSocket, ptr1, outbuf - ptr1, 0);
|
||||
if (ret == -1) {
|
||||
if (errno == ECONNRESET) {
|
||||
disconnect("Disconnected");
|
||||
@ -310,7 +310,7 @@ void s_putstring(char *c) {
|
||||
if (sshBBS) {
|
||||
fprintf(stdout, "%s", c);
|
||||
} else {
|
||||
ret = send(gSocket, c, strlen(c), MSG_DONTWAIT);
|
||||
ret = send(gSocket, c, strlen(c), 0);
|
||||
if (ret == -1) {
|
||||
if (errno == ECONNRESET) {
|
||||
disconnect("Disconnected");
|
||||
@ -330,7 +330,7 @@ void s_putstring(char *c) {
|
||||
if (sshBBS) {
|
||||
fprintf(stdout, "%s", ptr1);
|
||||
} else {
|
||||
ret = send(gSocket, ptr1, outbuf - ptr1, MSG_DONTWAIT);
|
||||
ret = send(gSocket, ptr1, outbuf - ptr1, 0);
|
||||
if (ret == -1) {
|
||||
if (errno == ECONNRESET) {
|
||||
disconnect("Disconnected");
|
||||
@ -455,7 +455,7 @@ char s_getchar() {
|
||||
if (d == 0) {
|
||||
if (telnet_bin_mode != 1) {
|
||||
telnet_bin_mode = 1;
|
||||
ret = send(gSocket, iac_binary_do, 3, MSG_DONTWAIT);
|
||||
ret = send(gSocket, iac_binary_do, 3, 0);
|
||||
if (ret == -1) {
|
||||
if (errno == ECONNRESET) {
|
||||
disconnect("Disconnected");
|
||||
@ -468,7 +468,7 @@ char s_getchar() {
|
||||
if (d == 0) {
|
||||
if (telnet_bin_mode != 0) {
|
||||
telnet_bin_mode = 0;
|
||||
ret = send(gSocket, iac_binary_dont, 3, MSG_DONTWAIT);
|
||||
ret = send(gSocket, iac_binary_dont, 3, 0);
|
||||
if (ret == -1) {
|
||||
if (errno == ECONNRESET) {
|
||||
disconnect("Disconnected");
|
||||
@ -481,7 +481,7 @@ char s_getchar() {
|
||||
if (d == 0) {
|
||||
if (telnet_bin_mode != 1) {
|
||||
telnet_bin_mode = 1;
|
||||
ret = send(gSocket, iac_binary_will, 3, MSG_DONTWAIT);
|
||||
ret = send(gSocket, iac_binary_will, 3, 0);
|
||||
if (ret == -1) {
|
||||
if (errno == ECONNRESET) {
|
||||
disconnect("Disconnected");
|
||||
@ -495,7 +495,7 @@ char s_getchar() {
|
||||
if (d == 0) {
|
||||
if (telnet_bin_mode != 0) {
|
||||
telnet_bin_mode = 0;
|
||||
ret = send(gSocket, iac_binary_wont, 3, MSG_DONTWAIT);
|
||||
ret = send(gSocket, iac_binary_wont, 3, 0);
|
||||
if (ret == -1) {
|
||||
if (errno == ECONNRESET) {
|
||||
disconnect("Disconnected");
|
||||
@ -863,11 +863,11 @@ void runbbs_real(int socket, char *ip, int ssh) {
|
||||
if (!ssh) {
|
||||
gUser = NULL;
|
||||
sshBBS = 0;
|
||||
if (send(socket, iac_echo, 3, MSG_DONTWAIT) != 3) {
|
||||
if (send(socket, iac_echo, 3, 0) != 3) {
|
||||
dolog("Failed to send iac_echo");
|
||||
exit(0);
|
||||
}
|
||||
if (send(socket, iac_sga, 3, MSG_DONTWAIT) != 3) {
|
||||
if (send(socket, iac_sga, 3, 0) != 3) {
|
||||
dolog("Failed to send iac_sga");
|
||||
exit(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user