aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
Diffstat (limited to 'FICS')
-rw-r--r--FICS/network.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/FICS/network.c b/FICS/network.c
index ab8c4e0..4fd0434 100644
--- a/FICS/network.c
+++ b/FICS/network.c
@@ -555,15 +555,23 @@ net_close_connection(int fd)
PUBLIC void
turn_echo_on(int fd)
{
+ int ret;
static unsigned char wont_echo[] = { IAC, WONT, TELOPT_ECHO, '\0' };
- send(fd, (char *) wont_echo, strlen((char *) wont_echo), 0);
+
+ ret = send(fd, (char *) wont_echo, strlen((char *) wont_echo), 0);
+ if (ret == -1)
+ warn("%s: cannot send", __func__);
}
PUBLIC void
turn_echo_off(int fd)
{
+ int ret;
static unsigned char will_echo[] = { IAC, WILL, TELOPT_ECHO, '\0' };
- send(fd, (char *) will_echo, strlen((char *) will_echo), 0);
+
+ ret = send(fd, (char *) will_echo, strlen((char *) will_echo), 0);
+ if (ret == -1)
+ warn("%s: cannot send", __func__);
}
PUBLIC unsigned int