From fe46d27eafb03ec5ad6df55aea4e84e7024531e4 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Sun, 15 Dec 2013 18:30:19 +0000 Subject: [PATCH] Bugfix in SOCKET_close for TCP git-svn-id: svn://kolibrios.org@4365 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/network/socket.inc | 6 +----- kernel/trunk/network/tcp_subr.inc | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kernel/trunk/network/socket.inc b/kernel/trunk/network/socket.inc index fd1d373f41..8435f59ed9 100644 --- a/kernel/trunk/network/socket.inc +++ b/kernel/trunk/network/socket.inc @@ -28,7 +28,7 @@ struct SOCKET PID dd ? ; process ID TID dd ? ; thread ID Domain dd ? ; INET/LOCAL/.. - Type dd ? ; RAW/STREAM/DGRAP + Type dd ? ; RAW/STREAM/DGRAM Protocol dd ? ; ICMP/IPv4/ARP/TCP/UDP errorcode dd ? device dd ? ; driver pointer, socket pointer if it's an LOCAL socket @@ -711,12 +711,8 @@ SOCKET_close: ret .tcp: - cmp [eax + TCP_SOCKET.t_state], TCPS_SYN_RECEIVED ; state must be LISTEN, SYN_SENT or CLOSED - jb .free call TCP_usrclosed - call TCP_output ;;;; Fixme: is this nescessary?? - call SOCKET_free ret diff --git a/kernel/trunk/network/tcp_subr.inc b/kernel/trunk/network/tcp_subr.inc index 7b206e4a20..78cb57b4bb 100644 --- a/kernel/trunk/network/tcp_subr.inc +++ b/kernel/trunk/network/tcp_subr.inc @@ -152,7 +152,9 @@ TCP_drop: mov [eax + TCP_SOCKET.t_state], TCPS_CLOSED + push eax call TCP_output + pop eax ;;; TODO: update stats