diff options
| author | Markus Uhlin <markus@nifty-networks.net> | 2025-11-11 20:44:29 +0100 |
|---|---|---|
| committer | Markus Uhlin <markus@nifty-networks.net> | 2025-11-11 20:44:29 +0100 |
| commit | 48fb5b12eef313018afe337870045381e656edf3 (patch) | |
| tree | 4500d078a506cae78b905e9102dd07bedfe48932 /FICS/network.c | |
| parent | 1e31450b0d5406dbda4e6d5510f061d5a8aa9734 (diff) | |
ngc2: check that net_connected_host() is ok
Diffstat (limited to 'FICS/network.c')
| -rw-r--r-- | FICS/network.c | 9 |
1 files changed, 8 insertions, 1 deletions
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); } } |
