revert some changes

This commit is contained in:
Andrew Pamment 2018-02-18 15:11:29 +10:00
parent aa21b714e5
commit ec747992a4

View File

@ -262,7 +262,7 @@ void s_putchar(char c) {
if (sshBBS) { if (sshBBS) {
putchar(c); putchar(c);
} else { } else {
ret = send(gSocket, &c, 1, MSG_DONTWAIT); ret = send(gSocket, &c, 1, 0);
if (ret == -1) { if (ret == -1) {
if (errno == ECONNRESET) { if (errno == ECONNRESET) {
disconnect("Disconnected"); disconnect("Disconnected");
@ -283,7 +283,7 @@ void s_putchar(char c) {
if (sshBBS) { if (sshBBS) {
fprintf(stdout, "%s", ptr1); fprintf(stdout, "%s", ptr1);
} else { } else {
ret = send(gSocket, ptr1, outbuf - ptr1, MSG_DONTWAIT); ret = send(gSocket, ptr1, outbuf - ptr1, 0);
if (ret == -1) { if (ret == -1) {
if (errno == ECONNRESET) { if (errno == ECONNRESET) {
disconnect("Disconnected"); disconnect("Disconnected");
@ -310,7 +310,7 @@ void s_putstring(char *c) {
if (sshBBS) { if (sshBBS) {
fprintf(stdout, "%s", c); fprintf(stdout, "%s", c);
} else { } else {
ret = send(gSocket, c, strlen(c), MSG_DONTWAIT); ret = send(gSocket, c, strlen(c), 0);
if (ret == -1) { if (ret == -1) {
if (errno == ECONNRESET) { if (errno == ECONNRESET) {
disconnect("Disconnected"); disconnect("Disconnected");
@ -330,7 +330,7 @@ void s_putstring(char *c) {
if (sshBBS) { if (sshBBS) {
fprintf(stdout, "%s", ptr1); fprintf(stdout, "%s", ptr1);
} else { } else {
ret = send(gSocket, ptr1, outbuf - ptr1, MSG_DONTWAIT); ret = send(gSocket, ptr1, outbuf - ptr1, 0);
if (ret == -1) { if (ret == -1) {
if (errno == ECONNRESET) { if (errno == ECONNRESET) {
disconnect("Disconnected"); disconnect("Disconnected");
@ -455,7 +455,7 @@ char s_getchar() {
if (d == 0) { if (d == 0) {
if (telnet_bin_mode != 1) { if (telnet_bin_mode != 1) {
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 (ret == -1) {
if (errno == ECONNRESET) { if (errno == ECONNRESET) {
disconnect("Disconnected"); disconnect("Disconnected");
@ -468,7 +468,7 @@ char s_getchar() {
if (d == 0) { if (d == 0) {
if (telnet_bin_mode != 0) { if (telnet_bin_mode != 0) {
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 (ret == -1) {
if (errno == ECONNRESET) { if (errno == ECONNRESET) {
disconnect("Disconnected"); disconnect("Disconnected");
@ -481,7 +481,7 @@ char s_getchar() {
if (d == 0) { if (d == 0) {
if (telnet_bin_mode != 1) { if (telnet_bin_mode != 1) {
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 (ret == -1) {
if (errno == ECONNRESET) { if (errno == ECONNRESET) {
disconnect("Disconnected"); disconnect("Disconnected");
@ -495,7 +495,7 @@ char s_getchar() {
if (d == 0) { if (d == 0) {
if (telnet_bin_mode != 0) { if (telnet_bin_mode != 0) {
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 (ret == -1) {
if (errno == ECONNRESET) { if (errno == ECONNRESET) {
disconnect("Disconnected"); disconnect("Disconnected");
@ -863,11 +863,11 @@ void runbbs_real(int socket, char *ip, int ssh) {
if (!ssh) { if (!ssh) {
gUser = NULL; gUser = NULL;
sshBBS = 0; 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"); dolog("Failed to send iac_echo");
exit(0); 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"); dolog("Failed to send iac_sga");
exit(0); exit(0);
} }