/[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.31.2.7 by jani, Wed Nov 5 09:07:46 2003 UTC revision 1.31.2.8 by jani, Wed Nov 5 09:27:48 2003 UTC
# Line 768  tcp_segs_free(struct tcp_seg *seg) Line 768  tcp_segs_free(struct tcp_seg *seg)
768  {  {
769    u8_t count = 0;    u8_t count = 0;
770    struct tcp_seg *next;    struct tcp_seg *next;
771   again:      while (seg != NULL) {
   if (seg != NULL) {  
772      next = seg->next;      next = seg->next;
773      count += tcp_seg_free(seg);      count += tcp_seg_free(seg);
774      seg = next;      seg = next;
     goto again;  
775    }    }
776    return count;    return count;
777  }  }
# Line 791  tcp_seg_free(struct tcp_seg *seg) Line 789  tcp_seg_free(struct tcp_seg *seg)
789    u8_t count = 0;    u8_t count = 0;
790        
791    if (seg != NULL) {    if (seg != NULL) {
792      if (seg->p == NULL) {      if (seg->p != NULL) {
       memp_free(MEMP_TCP_SEG, seg);  
     } else {  
793        count = pbuf_free(seg->p);        count = pbuf_free(seg->p);
794  #if TCP_DEBUG  #if TCP_DEBUG
795        seg->p = NULL;        seg->p = NULL;
796  #endif /* TCP_DEBUG */  #endif /* TCP_DEBUG */
       memp_free(MEMP_TCP_SEG, seg);  
797      }      }
798        memp_free(MEMP_TCP_SEG, seg);
799    }    }
800    return count;    return count;
801  }  }

Legend:
Removed from v.1.31.2.7  
changed lines
  Added in v.1.31.2.8

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