about summary refs log tree commit diff
diff options
context:
space:
mode:
-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;
 }