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

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

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

revision 1.17 by davidhaas, Thu Feb 6 22:18:56 2003 UTC revision 1.18 by jani, Fri Feb 21 16:43:46 2003 UTC
# Line 41  Line 41 
41   */   */
42  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
43    
 #include "lwip/debug.h"  
44    
45  #include "lwip/def.h"  #include "lwip/def.h"
46  #include "lwip/opt.h"  #include "lwip/opt.h"
# Line 387  tcp_listen_input(struct tcp_pcb_listen * Line 386  tcp_listen_input(struct tcp_pcb_listen *
386      tcp_parseopt(npcb);      tcp_parseopt(npcb);
387            
388      /* Build an MSS option. */      /* Build an MSS option. */
389      optdata = HTONL(((u32_t)2 << 24) |      optdata = htonl(((u32_t)2 << 24) |
390                      ((u32_t)4 << 16) |                      ((u32_t)4 << 16) |
391                      (((u32_t)npcb->mss / 256) << 8) |                      (((u32_t)npcb->mss / 256) << 8) |
392                      (npcb->mss & 255));                      (npcb->mss & 255));
# Line 725  tcp_receive(struct tcp_pcb *pcb) Line 724  tcp_receive(struct tcp_pcb *pcb)
724          tcp_seg_free(next);          tcp_seg_free(next);
725                    
726          DEBUGF(TCP_QLEN_DEBUG, ("%d (after freeing unacked)\n", pcb->snd_queuelen));          DEBUGF(TCP_QLEN_DEBUG, ("%d (after freeing unacked)\n", pcb->snd_queuelen));
 #ifdef LWIP_DEBUG  
727          if(pcb->snd_queuelen != 0) {          if(pcb->snd_queuelen != 0) {
728            LWIP_ASSERT("tcp_receive: valid queue length", pcb->unacked != NULL ||            LWIP_ASSERT("tcp_receive: valid queue length", pcb->unacked != NULL ||
729                   pcb->unsent != NULL);                         pcb->unsent != NULL);      
730          }          }
 #endif /* LWIP_DEBUG */  
731        }        }
732        pcb->polltmr = 0;        pcb->polltmr = 0;
733      }      }
# Line 756  tcp_receive(struct tcp_pcb *pcb) Line 753  tcp_receive(struct tcp_pcb *pcb)
753          pcb->snd_queuelen -= pbuf_clen(next->p);          pcb->snd_queuelen -= pbuf_clen(next->p);
754          tcp_seg_free(next);          tcp_seg_free(next);
755          DEBUGF(TCP_QLEN_DEBUG, ("%d (after freeing unsent)\n", pcb->snd_queuelen));          DEBUGF(TCP_QLEN_DEBUG, ("%d (after freeing unsent)\n", pcb->snd_queuelen));
 #ifdef LWIP_DEBUG  
756          if(pcb->snd_queuelen != 0) {          if(pcb->snd_queuelen != 0) {
757            LWIP_ASSERT("tcp_receive: valid queue length", pcb->unacked != NULL ||            LWIP_ASSERT("tcp_receive: valid queue length", pcb->unacked != NULL ||
758                   pcb->unsent != NULL);                         pcb->unsent != NULL);      
759          }          }
 #endif /* LWIP_DEBUG */  
760                    
761          if(pcb->unsent != NULL) {          if(pcb->unsent != NULL) {
762            pcb->snd_nxt = htonl(pcb->unsent->tcphdr->seqno);            pcb->snd_nxt = htonl(pcb->unsent->tcphdr->seqno);

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

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