diff options
Diffstat (limited to 'FICS/network.c')
| -rw-r--r-- | FICS/network.c | 11 |
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 |
