[ros-diffs] [cmihail] 52396: [lwIP] - Remove foreign identifier field from the tcp_pcb structure. This was added for some debugging purposes sometime ago but now it's useless and it was just polluting lwIP code.

cmihail at svn.reactos.org cmihail at svn.reactos.org
Tue Jun 21 09:19:14 UTC 2011


Author: cmihail
Date: Tue Jun 21 09:19:12 2011
New Revision: 52396

URL: http://svn.reactos.org/svn/reactos?rev=52396&view=rev
Log:
[lwIP]
- Remove foreign identifier field from the tcp_pcb structure. This was added for some debugging purposes sometime ago but now it's useless and it was just polluting lwIP code.

Modified:
    branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp.c
    branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp_in.c
    branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/include/lwip/tcp.h

Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp.c
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp.c?rev=52396&r1=52395&r2=52396&view=diff
==============================================================================
--- branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp.c [iso-8859-1] (original)
+++ branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp.c [iso-8859-1] Tue Jun 21 09:19:12 2011
@@ -769,7 +769,7 @@
     LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN);
     LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT);
 
-    LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: active pcb ports (%d -> %d) %d\n", pcb->local_port, pcb->remote_port, pcb->identifier));
+    LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: active pcb = 0x%x ports (%d -> %d)\n", pcb, pcb->local_port, pcb->remote_port));
 
     pcb_remove = 0;
     pcb_reset = 0;

Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp_in.c
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp_in.c?rev=52396&r1=52395&r2=52396&view=diff
==============================================================================
--- branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp_in.c [iso-8859-1] (original)
+++ branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp_in.c [iso-8859-1] Tue Jun 21 09:19:12 2011
@@ -298,7 +298,7 @@
 
   if (pcb != NULL)
   {
-      LWIP_DEBUGF(TCP_DEBUG, ("tcp_input: pcb->id = %d is for active connection\n", pcb->identifier));
+      LWIP_DEBUGF(TCP_DEBUG, ("tcp_input: pcb = 0x%x is for active connection\n", pcb));
     /* The incoming segment belongs to a connection. */
 #if TCP_INPUT_DEBUG
 #if TCP_DEBUG
@@ -535,7 +535,6 @@
        for it. */
     TCP_REG(&tcp_active_pcbs, npcb);
 
-    npcb->identifier = 21912;
     LWIP_DEBUGF(TCP_DEBUG, ("TCP new pcb created with %"U16_F" -> %"U16_F".\n", npcb->local_port, npcb->remote_port));
 
     /* Parse any options in the SYN. */
@@ -683,8 +682,8 @@
       pcb->state = ESTABLISHED;
 
       LWIP_DEBUGF(TCP_DEBUG,
-          ("[tcp_process] (SYN_SENT) TCP connection established %"U16_F" -> %"U16_F", %"U16_F"\n",
-          pcb->local_port , pcb->remote_port, pcb->identifier));
+          ("[tcp_process] (SYN_SENT) TCP connection established %"U16_F" -> %"U16_F"\n",
+          pcb->local_port , pcb->remote_port));
 
 #if TCP_CALCULATE_EFF_SEND_MSS
       pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip));
@@ -734,11 +733,11 @@
         u16_t old_cwnd;
         pcb->state = ESTABLISHED;
         LWIP_DEBUGF(TCP_DEBUG,
-            ("[tcp_process] (SYN_RCVD) TCP connection established %"U16_F" -> %"U16_F" for %"U16_F"\n",
-            inseg.tcphdr->src, inseg.tcphdr->dest, pcb->identifier));
+            ("[tcp_process] (SYN_RCVD) TCP connection established %"U16_F" -> %"U16_F"\n",
+            inseg.tcphdr->src, inseg.tcphdr->dest));
         LWIP_DEBUGF(TCP_DEBUG,
-            ("[tcp_process] (SYN_RCVD) TCP local port = %"U16_F" and ID = %"U16_F"\n",
-            pcb->local_port, pcb->identifier));
+            ("[tcp_process] (SYN_RCVD) TCP local port = %"U16_F"\n",
+            pcb->local_port));
 
 #if LWIP_CALLBACK_API
         LWIP_ASSERT("pcb->accept != NULL", pcb->accept != NULL);

Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/include/lwip/tcp.h
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/include/lwip/tcp.h?rev=52396&r1=52395&r2=52396&view=diff
==============================================================================
--- branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/include/lwip/tcp.h [iso-8859-1] (original)
+++ branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/include/lwip/tcp.h [iso-8859-1] Tue Jun 21 09:19:12 2011
@@ -277,7 +277,6 @@
 
   /* KEEPALIVE counter */
   u8_t keep_cnt_sent;
-  u16_t identifier;
 };
 
 struct tcp_pcb_listen {  




More information about the Ros-diffs mailing list