aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2025-03-16 23:03:08 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2025-03-16 23:03:08 +0100
commit3adf448e51cc9743ae2bc56ccdba4e7f9ece2b93 (patch)
treede196892d3724c369529cbb123a7b2e646089991
parent68d5033cab94fa5d0761b5ab6141c2de863a2fed (diff)
Log send errors
-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