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)
|
||||
mov [esi + TCP_header.Checksum], dx
|
||||
|
||||
; unlock socket
|
||||
lea ecx, [eax + SOCKET.mutex]
|
||||
call mutex_unlock
|
||||
|
||||
;----------------
|
||||
; Send the packet
|
||||
|
||||
@ -533,6 +537,10 @@ TCP_send:
|
||||
|
||||
inc [TCP_segments_tx] ; FIXME: correct interface?
|
||||
|
||||
; unlock socket
|
||||
lea ecx, [eax + SOCKET.mutex]
|
||||
call mutex_lock
|
||||
|
||||
; update advertised receive window
|
||||
test ecx, ecx
|
||||
jz @f
|
||||
@ -580,12 +588,7 @@ TCP_send:
|
||||
ret
|
||||
|
||||
.send_error:
|
||||
add esp, 4
|
||||
pop eax
|
||||
|
||||
; unlock socket
|
||||
lea ecx, [eax + SOCKET.mutex]
|
||||
call mutex_unlock
|
||||
add esp, 8
|
||||
|
||||
DEBUGF 1,"TCP_send: sending failed\n"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user