Subversion Repositories Kolibri OS

Rev

Rev 3589 | Rev 3725 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3589 Rev 3626
Line 91... Line 91...
91
       @@:
91
       @@:
92
        inc     ecx
92
        inc     ecx
93
        jmp     .no_force
93
        jmp     .no_force
Line 94... Line 94...
94
 
94
 
95
  .no_zero_window:
95
  .no_zero_window:
96
        mov     [eax + TCP_SOCKET.timer_persist], 0
96
        and     [eax + TCP_SOCKET.timer_flags], not timer_flag_persist
Line 97... Line 97...
97
        mov     [eax + TCP_SOCKET.t_rxtshift], 0
97
        mov     [eax + TCP_SOCKET.t_rxtshift], 0
Line 98... Line 98...
98
 
98
 
Line 123... Line 123...
123
; If window shrank to 0
123
; If window shrank to 0
124
        test    ecx, ecx
124
        test    ecx, ecx
125
        jnz     @f
125
        jnz     @f
Line 126... Line 126...
126
 
126
 
127
; cancel pending retransmit
127
; cancel pending retransmit
Line 128... Line 128...
128
        mov     [eax + TCP_SOCKET.timer_retransmission], 0
128
        and     [eax + TCP_SOCKET.timer_flags], not timer_flag_retransmission
129
 
129
 
130
; pull SND_NXT back to (closed) window, We will enter persist state below.
130
; pull SND_NXT back to (closed) window, We will enter persist state below.
131
        push    [eax + TCP_SOCKET.SND_UNA]
131
        push    [eax + TCP_SOCKET.SND_UNA]
Line 266... Line 266...
266
 
266
 
Line 267... Line 267...
267
  .enter_persist:
267
  .enter_persist:
268
 
268
 
269
        cmp     [eax + STREAM_SOCKET.snd.size], 0       ; Data ready to send?
269
        cmp     [eax + STREAM_SOCKET.snd.size], 0                       ; Data ready to send?
270
        jne     @f
-
 
271
        cmp     [eax + TCP_SOCKET.timer_retransmission], 0
-
 
272
        jne     @f
270
        jne     @f
Line -... Line 271...
-
 
271
        and     [eax + TCP_SOCKET.timer_flags], not timer_flag_retransmission
-
 
272
        jne     @f
-
 
273
 
273
        cmp     [eax + TCP_SOCKET.timer_persist], 0     ; Persist timer already expired?
274
        test    [eax + TCP_SOCKET.timer_flags], timer_flag_persist      ; Persist timer already expired?
Line 274... Line 275...
274
        jne     @f
275
        jnz     @f
275
 
276
 
276
        DEBUGF  DEBUG_NETWORK_VERBOSE, "TCP_output: Entering persist state\n"
277
        DEBUGF  DEBUG_NETWORK_VERBOSE, "TCP_output: Entering persist state\n"
Line 510... Line 511...
510
        mov     [eax + TCP_SOCKET.t_rtseq], edi
511
        mov     [eax + TCP_SOCKET.t_rtseq], edi
511
;TODO: update stats
512
;TODO: update stats
512
       @@:
513
       @@:
Line 513... Line 514...
513
 
514
 
514
; set retransmission timer if not already set, and not doing an ACK or keepalive probe
-
 
515
 
515
; set retransmission timer if not already set, and not doing an ACK or keepalive probe
516
        cmp     [eax + TCP_SOCKET.timer_retransmission], 0 ;;;; FIXME
516
        test    [eax + TCP_SOCKET.timer_flags], timer_flag_retransmission
Line 517... Line 517...
517
        ja      .retransmit_set
517
        jnz     .retransmit_set
518
 
518
 
Line 519... Line 519...
519
        cmp     edx, [eax + TCP_SOCKET.SND_UNA]                 ; edx is still [eax + TCP_SOCKET.SND_NXT]
519
        cmp     edx, [eax + TCP_SOCKET.SND_UNA]                 ; edx is still [eax + TCP_SOCKET.SND_NXT]
520
        je      .retransmit_set
520
        je      .retransmit_set
-
 
521
 
Line 521... Line 522...
521
 
522
        mov     edx, [eax + TCP_SOCKET.t_rxtcur]
522
        mov     edx, [eax + TCP_SOCKET.t_rxtcur]
523
        mov     [eax + TCP_SOCKET.timer_retransmission], edx
523
        mov     [eax + TCP_SOCKET.timer_retransmission], edx
524
        or      [eax + TCP_SOCKET.timer_flags], timer_flag_retransmission
524
 
525
 
Line 525... Line 526...
525
        cmp     [eax + TCP_SOCKET.timer_persist], 0
526
        test    [eax + TCP_SOCKET.timer_flags], timer_flag_persist
Line 526... Line 527...
526
        jne     .retransmit_set
527
        jz      .retransmit_set
Line 591... Line 592...
591
        add     esp, ecx
592
        add     esp, ecx
592
        add     esp, 4
593
        add     esp, 4
593
        pop     eax
594
        pop     eax
Line 594... Line 595...
594
 
595
 
-
 
596
        mov     [eax + TCP_SOCKET.timer_retransmission], TCP_time_re_min
Line 595... Line 597...
595
        mov     [eax + TCP_SOCKET.timer_retransmission], TCP_time_re_min
597
        or      [eax + TCP_SOCKET.timer_flags], timer_flag_retransmission
596
 
598
 
Line 597... Line 599...
597
        lea     ecx, [eax + SOCKET.mutex]
599
        lea     ecx, [eax + SOCKET.mutex]
Line 598... Line 600...
598
        call    mutex_unlock
600
        call    mutex_unlock
599
 
601
 
Line 607... Line 609...
607
        add     esp, 8
609
        add     esp, 8
Line 608... Line 610...
608
 
610
 
609
        lea     ecx, [eax + SOCKET.mutex]
611
        lea     ecx, [eax + SOCKET.mutex]
Line 610... Line 612...
610
        call    mutex_unlock
612
        call    mutex_unlock
Line 611... Line 613...
611
 
613
 
612
        DEBUGF  DEBUG_NETWORK_VERBOSE, "TCP_send: sending failed\n"
614
        DEBUGF  DEBUG_NETWORK_ERROR, "TCP_send: sending failed\n"