zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: tcp_close
@ 2001-06-11 14:17 Clint Adams
  0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2001-06-11 14:17 UTC (permalink / raw)
  To: zsh-workers


One of these days I'll actually get somewhere with this.

Index: Src/Modules/tcp.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/tcp.c,v
retrieving revision 1.1
diff -u -r1.1 tcp.c
--- Src/Modules/tcp.c	2001/06/06 18:53:56	1.1
+++ Src/Modules/tcp.c	2001/06/11 14:16:36
@@ -230,13 +230,21 @@
 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
 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 */
Index: Src/Modules/zftp.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zftp.c,v
retrieving revision 1.14
diff -u -r1.14 zftp.c
--- Src/Modules/zftp.c	2001/06/08 03:05:50	1.14
+++ Src/Modules/zftp.c	2001/06/11 14:16:37
@@ -2683,8 +2683,7 @@
     }
     if (zfsess->control.fd != -1) {
 	zfnopen--;
-	close(zfsess->control.fd);
-	zfsess->control.fd = -1;
+	tcp_close(&(zfsess->control));
     }
 
     if (zfstatfd != -1) {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-11 14:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-11 14:17 PATCH: tcp_close Clint Adams

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).