289,6 → 289,8 |
call mutex_unlock |
popa |
|
; Fixme: returnvalue? |
|
ret |
|
|
533,10 → 535,6 |
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 |
|
552,10 → 550,6 |
|
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 |
572,13 → 566,20 |
; and flags |
and [eax + TCP_SOCKET.t_flags], not (TF_ACKNOW + TF_DELACK) |
|
test [eax + TCP_SOCKET.temp_bits], TCP_BIT_SENDALOT |
jnz TCP_output.again |
;-------------- |
; unlock socket |
|
; unlock socket |
push eax |
lea ecx, [eax + SOCKET.mutex] |
call mutex_unlock |
pop eax |
|
;----------------------------- |
; Check if we need more output |
|
test [eax + TCP_SOCKET.temp_bits], TCP_BIT_SENDALOT |
jnz TCP_output.again |
|
DEBUGF 1,"TCP_send: success!\n" |
|
xor eax, eax |
593,7 → 594,6 |
|
mov [eax + TCP_SOCKET.timer_retransmission], TCP_time_re_min |
|
; unlock socket |
lea ecx, [eax + SOCKET.mutex] |
call mutex_unlock |
|
602,9 → 602,13 |
or eax, -1 |
ret |
|
|
.send_error: |
add esp, 8 |
|
lea ecx, [eax + SOCKET.mutex] |
call mutex_unlock |
|
DEBUGF 1,"TCP_send: sending failed\n" |
|
or eax, -2 |