Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: tcp/zftp function name

This fixes one of the two remaining problems I'm having with tcp and zftp,
namely an error message from zsh's free().  It seems an undocumented
library function which called free() was insinuating its way in, though
where from I still haven't a clue; gdb couldn't trace it, so it's unlikely
to be a stray bit of zsh.

Now there's just the matter of
  zfclose:3: connection close failed: bad file number
to deal with.

Index: Src/Modules/tcp.c
RCS file: /cvsroot/zsh/zsh/Src/Modules/tcp.c,v
retrieving revision 1.19
diff -u -r1.19 tcp.c
--- Src/Modules/tcp.c	2001/10/14 17:23:30	1.19
+++ Src/Modules/tcp.c	2001/10/26 11:56:38
@@ -194,7 +194,7 @@
 mod_export void
-freehostent(struct hostent *ptr)
+zfreehostent(struct hostent *ptr)
Index: Src/Modules/zftp.c
RCS file: /cvsroot/zsh/zsh/Src/Modules/zftp.c,v
retrieving revision 1.22
diff -u -r1.22 zftp.c
--- Src/Modules/zftp.c	2001/10/26 11:09:48	1.22
+++ Src/Modules/zftp.c	2001/10/26 11:56:38
@@ -1793,7 +1793,7 @@
 		zfsess->control = NULL;
-	    freehostent(zhostp);
+	    zfreehostent(zhostp);
 	    zwarnnam(name, "socket failed: %e", NULL, errno);
@@ -1821,7 +1821,7 @@
 	if (err) {
-	    freehostent(zhostp);
+	    zfreehostent(zhostp);
 	    zwarnnam(name, "connect failed: %e", NULL, errno);
@@ -1842,7 +1842,7 @@
 	zsh_inet_ntop(af, *addrp, pbuf, sizeof(pbuf));
 	zfsetparam("ZFTP_IP", ztrdup(pbuf), ZFPM_READONLY);
-    freehostent(zhostp);
+    zfreehostent(zhostp);
     /* now we can talk to the control connection */
     zcfinish = 0;
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070

The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
If you received this in error, please contact the sender and 
delete the material from any computer.

Messages sorted by: Reverse Date, Date, Thread, Author