zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: zsh-workers@sunsite.dk
Subject: PATCH: tcp_close
Date: Mon, 11 Jun 2001 10:17:57 -0400	[thread overview]
Message-ID: <20010611101757.A28819@dman.com> (raw)


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) {


                 reply	other threads:[~2001-06-11 14:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010611101757.A28819@dman.com \
    --to=clint@zsh.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).