From 48fb5b12eef313018afe337870045381e656edf3 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Tue, 11 Nov 2025 20:44:29 +0100 Subject: ngc2: check that net_connected_host() is ok --- FICS/network.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'FICS/network.c') diff --git a/FICS/network.c b/FICS/network.c index 752efd2..5b2f2ac 100644 --- a/FICS/network.c +++ b/FICS/network.c @@ -627,7 +627,14 @@ ngc2(comstr_t *cs, int timeout) psend_raw_file(fd, mess_dir, MESS_FULL); close(fd); } else { - process_new_connection(fd, net_connected_host(fd)); + unsigned int fromHost = 0; + + if (!net_connected_host(fd, &fromHost)) { + close(fd); + continue; + } + + process_new_connection(fd, fromHost); } } -- cgit v1.2.3