zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: tcp/zftp function name
@ 2001-10-26 12:02 Peter Stephenson
  2001-10-26 12:05 ` Peter Stephenson
  2001-10-26 13:13 ` PATCH: tcp/zftp close Peter Stephenson
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Stephenson @ 2001-10-26 12:02 UTC (permalink / raw)
  To: Zsh hackers list

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 @@
 		tcp_close(zfsess->control);
 		zfsess->control = NULL;
 	    }
-	    freehostent(zhostp);
+	    zfreehostent(zhostp);
 	    zfunsetparam("ZFTP_HOST");
 	    FAILED();
 	    zwarnnam(name, "socket failed: %e", NULL, errno);
@@ -1821,7 +1821,7 @@
 	}
 
 	if (err) {
-	    freehostent(zhostp);
+	    zfreehostent(zhostp);
 	    zfclose(0);
 	    FAILED();
 	    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@csr.com>                  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 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-10-26 17:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-26 12:02 PATCH: tcp/zftp function name Peter Stephenson
2001-10-26 12:05 ` Peter Stephenson
2001-10-26 13:13 ` PATCH: tcp/zftp close Peter Stephenson
2001-10-26 17:05   ` Bart Schaefer

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