forked from KolibriOS/kolibrios
Fixed some cases of terrible deadlock in TCP.
git-svn-id: svn://kolibrios.org@2940 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
cd0f28c5ce
commit
b0b5a26dd8
@ -518,6 +518,10 @@ TCP_send:
|
|||||||
TCP_checksum (eax + IP_SOCKET.LocalIP), (eax + IP_SOCKET.RemoteIP)
|
TCP_checksum (eax + IP_SOCKET.LocalIP), (eax + IP_SOCKET.RemoteIP)
|
||||||
mov [esi + TCP_header.Checksum], dx
|
mov [esi + TCP_header.Checksum], dx
|
||||||
|
|
||||||
|
; unlock socket
|
||||||
|
lea ecx, [eax + SOCKET.mutex]
|
||||||
|
call mutex_unlock
|
||||||
|
|
||||||
;----------------
|
;----------------
|
||||||
; Send the packet
|
; Send the packet
|
||||||
|
|
||||||
@ -533,6 +537,10 @@ TCP_send:
|
|||||||
|
|
||||||
inc [TCP_segments_tx] ; FIXME: correct interface?
|
inc [TCP_segments_tx] ; FIXME: correct interface?
|
||||||
|
|
||||||
|
; unlock socket
|
||||||
|
lea ecx, [eax + SOCKET.mutex]
|
||||||
|
call mutex_lock
|
||||||
|
|
||||||
; update advertised receive window
|
; update advertised receive window
|
||||||
test ecx, ecx
|
test ecx, ecx
|
||||||
jz @f
|
jz @f
|
||||||
@ -580,12 +588,7 @@ TCP_send:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.send_error:
|
.send_error:
|
||||||
add esp, 4
|
add esp, 8
|
||||||
pop eax
|
|
||||||
|
|
||||||
; unlock socket
|
|
||||||
lea ecx, [eax + SOCKET.mutex]
|
|
||||||
call mutex_unlock
|
|
||||||
|
|
||||||
DEBUGF 1,"TCP_send: sending failed\n"
|
DEBUGF 1,"TCP_send: sending failed\n"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user