Bugfix in SOCKET_close for TCP

git-svn-id: svn://kolibrios.org@4365 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2013-12-15 18:30:19 +00:00
parent bb2bbc6b91
commit fe46d27eaf
2 changed files with 3 additions and 5 deletions

View File

@ -28,7 +28,7 @@ struct SOCKET
PID dd ? ; process ID PID dd ? ; process ID
TID dd ? ; thread ID TID dd ? ; thread ID
Domain dd ? ; INET/LOCAL/.. Domain dd ? ; INET/LOCAL/..
Type dd ? ; RAW/STREAM/DGRAP Type dd ? ; RAW/STREAM/DGRAM
Protocol dd ? ; ICMP/IPv4/ARP/TCP/UDP Protocol dd ? ; ICMP/IPv4/ARP/TCP/UDP
errorcode dd ? errorcode dd ?
device dd ? ; driver pointer, socket pointer if it's an LOCAL socket device dd ? ; driver pointer, socket pointer if it's an LOCAL socket
@ -711,12 +711,8 @@ SOCKET_close:
ret ret
.tcp: .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_usrclosed
call TCP_output ;;;; Fixme: is this nescessary??
call SOCKET_free
ret ret

View File

@ -152,7 +152,9 @@ TCP_drop:
mov [eax + TCP_SOCKET.t_state], TCPS_CLOSED mov [eax + TCP_SOCKET.t_state], TCPS_CLOSED
push eax
call TCP_output call TCP_output
pop eax
;;; TODO: update stats ;;; TODO: update stats