/[lwip]/lwip/src/core/tcp.c
ViewVC logotype

Diff of /lwip/src/core/tcp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22.2.4 by likewise, Wed Jun 4 10:30:00 2003 UTC revision 1.22.2.5 by likewise, Wed Jun 4 17:15:22 2003 UTC
# Line 264  tcp_bind(struct tcp_pcb *pcb, struct ip_ Line 264  tcp_bind(struct tcp_pcb *pcb, struct ip_
264        cpcb != NULL; cpcb = cpcb->next) {        cpcb != NULL; cpcb = cpcb->next) {
265      if (cpcb->local_port == port) {      if (cpcb->local_port == port) {
266        if (ip_addr_isany(&(cpcb->local_ip)) ||        if (ip_addr_isany(&(cpcb->local_ip)) ||
267           ip_addr_isany(ipaddr) ||          ip_addr_isany(ipaddr) ||
268           ip_addr_cmp(&(cpcb->local_ip), ipaddr)) {          ip_addr_cmp(&(cpcb->local_ip), ipaddr)) {
269          return ERR_USE;            return ERR_USE;
270        }        }
271      }      }
272    }    }
# Line 497  tcp_slowtmr(void) Line 497  tcp_slowtmr(void)
497          DEBUGF(TCP_RTO_DEBUG, ("tcp_slowtmr: rtime %u pcb->rto %u\n",          DEBUGF(TCP_RTO_DEBUG, ("tcp_slowtmr: rtime %u pcb->rto %u\n",
498            pcb->rtime, pcb->rto));            pcb->rtime, pcb->rto));
499    
500          /* Double retransmission time-out unless we are trying to          /* Double retransmission time-out unless we are trying to
501             connect to somebody (i.e., we are in SYN_SENT). */           * connect to somebody (i.e., we are in SYN_SENT). */
502          if (pcb->state != SYN_SENT) {          if (pcb->state != SYN_SENT) {
503            pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[pcb->nrtx];            pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[pcb->nrtx];
504          }          }
505            tcp_rexmit(pcb);
         tcp_rexmit(pcb);  
           
506          /* Reduce congestion window and ssthresh. */          /* Reduce congestion window and ssthresh. */
507          eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd);          eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd);
508          pcb->ssthresh = eff_wnd >> 1;          pcb->ssthresh = eff_wnd >> 1;
# Line 519  tcp_slowtmr(void) Line 517  tcp_slowtmr(void)
517      /* Check if this PCB has stayed too long in FIN-WAIT-2 */      /* Check if this PCB has stayed too long in FIN-WAIT-2 */
518      if (pcb->state == FIN_WAIT_2) {      if (pcb->state == FIN_WAIT_2) {
519        if ((u32_t)(tcp_ticks - pcb->tmr) >        if ((u32_t)(tcp_ticks - pcb->tmr) >
520           TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) {          TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) {
521          ++pcb_remove;          ++pcb_remove;
522          DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in FIN-WAIT-2\n"));          DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in FIN-WAIT-2\n"));
523        }        }

Legend:
Removed from v.1.22.2.4  
changed lines
  Added in v.1.22.2.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26