|
@@ -363,6 +363,7 @@ static int tcp_xmit ( struct tcp_connection *tcp, int force_send ) {
|
363
|
363
|
unsigned int flags;
|
364
|
364
|
size_t len = 0;
|
365
|
365
|
size_t seq_len;
|
|
366
|
+ size_t app_window;
|
366
|
367
|
size_t window;
|
367
|
368
|
int rc;
|
368
|
369
|
|
|
@@ -412,6 +413,9 @@ static int tcp_xmit ( struct tcp_connection *tcp, int force_send ) {
|
412
|
413
|
window = ( ( freemem * 3 ) / 4 );
|
413
|
414
|
if ( window > TCP_MAX_WINDOW_SIZE )
|
414
|
415
|
window = TCP_MAX_WINDOW_SIZE;
|
|
416
|
+ app_window = xfer_window ( &tcp->xfer );
|
|
417
|
+ if ( window > app_window )
|
|
418
|
+ window = app_window;
|
415
|
419
|
window &= ~0x03; /* Keep everything dword-aligned */
|
416
|
420
|
|
417
|
421
|
/* Fill up the TCP header */
|