1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 21:44:11 +01:00

17011: Src/Modules/tcp.c, Src/Modules/zftp.c: restore

freehostent() incorrectly removed in 16172.
This commit is contained in:
Peter Stephenson 2002-04-18 11:39:13 +00:00
parent 75eca01e4f
commit 2a55dc74ef
3 changed files with 9 additions and 4 deletions

@ -1,3 +1,8 @@
2002-04-18 Peter Stephenson <pws@csr.com>
* 17011: Src/Modules/tcp.c, Src/Modules/zftp.c: restore
freehostent() incorrectly removed in 16172.
2002-04-17 Peter Stephenson <pws@csr.com>
* Alexandre Duret-Lutz: 16930: Src/cond.c, Test/C02cond.ztst:

@ -194,7 +194,7 @@ zsh_getipnodebyname(char const *name, int af, int flags, int *errorp)
/**/
mod_export void
zfreehostent(struct hostent *ptr)
freehostent(struct hostent *ptr)
{
}

@ -1793,7 +1793,7 @@ zftp_open(char *name, char **args, int flags)
tcp_close(zfsess->control);
zfsess->control = NULL;
}
zfreehostent(zhostp);
freehostent(zhostp);
zfunsetparam("ZFTP_HOST");
FAILED();
zwarnnam(name, "socket failed: %e", NULL, errno);
@ -1821,7 +1821,7 @@ zftp_open(char *name, char **args, int flags)
}
if (err) {
zfreehostent(zhostp);
freehostent(zhostp);
zfclose(0);
FAILED();
zwarnnam(name, "connect failed: %e", NULL, errno);
@ -1842,7 +1842,7 @@ zftp_open(char *name, char **args, int flags)
zsh_inet_ntop(af, *addrp, pbuf, sizeof(pbuf));
zfsetparam("ZFTP_IP", ztrdup(pbuf), ZFPM_READONLY);
}
zfreehostent(zhostp);
freehostent(zhostp);
/* now we can talk to the control connection */
zcfinish = 0;