forked from KolibriOS/kolibrios
TCP_output: update advertised receive window correctly
git-svn-id: svn://kolibrios.org@6474 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
668afc0d0b
commit
9d14a71733
@ -1,6 +1,6 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
|
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
|
||||||
;; Distributed under terms of the GNU General Public License ;;
|
;; Distributed under terms of the GNU General Public License ;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;; Part of the TCP/IP network stack for KolibriOS ;;
|
;; Part of the TCP/IP network stack for KolibriOS ;;
|
||||||
@ -30,6 +30,7 @@ proc tcp_output
|
|||||||
|
|
||||||
locals
|
locals
|
||||||
temp_bits db ?
|
temp_bits db ?
|
||||||
|
window dd ?
|
||||||
endl
|
endl
|
||||||
|
|
||||||
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_output: socket=%x state=%u\n", eax, [eax + TCP_SOCKET.t_state]
|
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_output: socket=%x state=%u\n", eax, [eax + TCP_SOCKET.t_state]
|
||||||
@ -471,6 +472,7 @@ endl
|
|||||||
@@:
|
@@:
|
||||||
|
|
||||||
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_send: window=%u\n", ebx
|
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_send: window=%u\n", ebx
|
||||||
|
mov [window], ebx
|
||||||
|
|
||||||
mov cl, [eax + TCP_SOCKET.RCV_SCALE]
|
mov cl, [eax + TCP_SOCKET.RCV_SCALE]
|
||||||
shr ebx, cl
|
shr ebx, cl
|
||||||
@ -629,6 +631,8 @@ endl
|
|||||||
inc [TCPS_sndtotal]
|
inc [TCPS_sndtotal]
|
||||||
|
|
||||||
; update advertised receive window
|
; update advertised receive window
|
||||||
|
|
||||||
|
mov ecx, [window]
|
||||||
test ecx, ecx
|
test ecx, ecx
|
||||||
jz @f
|
jz @f
|
||||||
add ecx, [eax + TCP_SOCKET.RCV_NXT]
|
add ecx, [eax + TCP_SOCKET.RCV_NXT]
|
||||||
|
Loading…
Reference in New Issue
Block a user