summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-05-08 16:45:21 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-05-08 16:45:21 +0000
commit12e6a9ad322ca3da580ff07f8aa9337946760eee (patch)
treecf32f91b9116a8fe40e350337a0a801f3e2f15a6
parent8c47be28f9582d153fcd59d8370ad44d006b4b03 (diff)
downloadzsh-12e6a9ad322ca3da580ff07f8aa9337946760eee.tar.gz
zsh-12e6a9ad322ca3da580ff07f8aa9337946760eee.tar.xz
zsh-12e6a9ad322ca3da580ff07f8aa9337946760eee.zip
17102: looking up TCP sessions by fd returned the wrong pointer
-rw-r--r--ChangeLog3
-rw-r--r--Src/Modules/tcp.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f36c5013..6d9667e27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2002-05-08  Peter Stephenson  <pws@csr.com>
 
+	* 17102: Src/Modules/tcp.c: looking up TCP sessions by fd returned
+	the wrong pointer.
+
 	* 17097: Src/Modules/tcp.c: closing all TCP sessions referenced
 	freed memory.
 
diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c
index e00e220b5..f4339e134 100644
--- a/Src/Modules/tcp.c
+++ b/Src/Modules/tcp.c
@@ -271,7 +271,7 @@ zts_byfd(int fd)
     
     for (node = firstnode(ztcp_sessions); node; incnode(node))
 	if (((Tcp_session)getdata(node))->fd == fd)
-	    return (Tcp_session)node;
+	    return (Tcp_session)getdata(node);
     
     return NULL;
 }