aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/network.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2025-11-11 20:37:55 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2025-11-11 20:37:55 +0100
commitcffcc1f76c5d39877fd62c9524e02c15be7c9d6a (patch)
treef49937e446fdcd254671d722c25171b58d549895 /FICS/network.c
parent72404ead825e4d9e2a71af020654babe51955b9a (diff)
Changed net_connected_host()
Diffstat (limited to 'FICS/network.c')
-rw-r--r--FICS/network.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/FICS/network.c b/FICS/network.c
index 19c6f22..a530ce3 100644
--- a/FICS/network.c
+++ b/FICS/network.c
@@ -596,16 +596,19 @@ turn_echo_off(int fd)
warn("%s: cannot send", __func__);
}
-PUBLIC unsigned int
-net_connected_host(int fd)
+PUBLIC bool
+net_connected_host(int fd, unsigned int *fromHost)
{
int which;
if ((which = findConnection(fd)) < 0) {
fprintf(stderr, "FICS: FD not in connection table!\n");
- return -1;
+ *fromHost = 0;
+ return false;
}
- return con[which].fromHost;
+
+ *fromHost = con[which].fromHost;
+ return true;
}
PUBLIC void