diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2002-05-24 13:01:57 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2002-05-24 13:01:57 +0000 |
commit | 00d476ac200660819c0e534201d7f23bc444f4e4 (patch) | |
tree | ccafce43e2ed4bb81aa9bef9bde7f776641f930a | |
parent | 205e07663f21d4e7fe7863d976f1e73517a914bf (diff) | |
download | zsh-00d476ac200660819c0e534201d7f23bc444f4e4.tar.gz zsh-00d476ac200660819c0e534201d7f23bc444f4e4.tar.xz zsh-00d476ac200660819c0e534201d7f23bc444f4e4.zip |
17220: Src/Modules/tcp.c: bugs using ztcp to list connections.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/Modules/tcp.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 092e25d8d..5b5a88edf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-05-24 Peter Stephenson <pws@csr.com> + + * 17220: Src/Modules/tcp.c: bugs displaying host names and remote + host address when using `ztcp' to list connections. + 2002-05-24 Sven Wischnowsky <wischnow@zsh.org> * 17219: Src/Zle/complist.c: make re-display in menu selection diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c index 33b7a613a..27d11aea6 100644 --- a/Src/Modules/tcp.c +++ b/Src/Modules/tcp.c @@ -565,16 +565,16 @@ bin_ztcp(char *nam, char **args, char *ops, int func) if (sess->fd != -1) { - zthost = gethostbyaddr((const void *)&(sess->sock.in.sin_addr), sizeof(struct sockaddr_in), AF_INET); + zthost = gethostbyaddr((const void *)&(sess->sock.in.sin_addr), sizeof(sess->sock.in.sin_addr), AF_INET); if (zthost) localname = zthost->h_name; else localname = ztrdup(inet_ntoa(sess->sock.in.sin_addr)); - ztpeer = gethostbyaddr((const void *)&(sess->peer.in.sin_addr), sizeof(struct sockaddr_in), AF_INET); + ztpeer = gethostbyaddr((const void *)&(sess->peer.in.sin_addr), sizeof(sess->peer.in.sin_addr), AF_INET); if (ztpeer) remotename = ztpeer->h_name; else - remotename = ztrdup(inet_ntoa(sess->sock.in.sin_addr)); + remotename = ztrdup(inet_ntoa(sess->peer.in.sin_addr)); fprintf(shout, "%s:%d %s %s:%d is on fd %d%s\n", localname, ntohs(sess->sock.in.sin_port), ((sess->flags & ZTCP_LISTEN) ? "-<" : |