From ae09302120db6252c50d9a3d4ba07960ee6a81b8 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Mon, 11 Jun 2001 14:21:57 +0000 Subject: 14843: tcp_close --- Src/Modules/tcp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Src/Modules/tcp.c') diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c index 744343d67..44a380170 100644 --- a/Src/Modules/tcp.c +++ b/Src/Modules/tcp.c @@ -230,8 +230,8 @@ freehostent(struct hostent *ptr) mod_export int tcp_socket(int domain, int type, int protocol, Tcp_session sess) { - sess->fd = socket(domain, type, protocol); - return sess->fd; + sess->fd = socket(domain, type, protocol); + return sess->fd; } static void @@ -239,6 +239,14 @@ tcp_cleanup(void) { } +/**/ +mod_export int +tcp_close(Tcp_session sess) +{ + close(sess->fd); + sess->fd = -1; +} + /* The load/unload routines required by the zsh library interface */ /**/ -- cgit 1.4.1