[IP]
authorThomas Faber <thomas.faber@reactos.org>
Sat, 11 Feb 2017 11:46:38 +0000 (11:46 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 11 Feb 2017 11:46:38 +0000 (11:46 +0000)
- Print some debugging information when hitting 'p->tot_len == p->len' assertion in TCPSendDataCallback.
CORE-10715

svn path=/trunk/; revision=73772

reactos/sdk/lib/drivers/ip/transport/tcp/if.c

index 9531738..c459da3 100644 (file)
@@ -49,8 +49,15 @@ TCPSendDataCallback(struct netif *netif, struct pbuf *p, struct ip_addr *dest)
     GetDataPtr(Packet.NdisPacket, 0, (PCHAR*)&Packet.Header, &Packet.TotalSize);
     Packet.MappedHeader = TRUE;
 
-    ASSERT(p->tot_len == p->len);
-    ASSERT(Packet.TotalSize == p->len);
+    if (p->tot_len != p->len ||
+        Packet.TotalSize != p->len)
+    {
+        TI_DbgPrint(MIN_TRACE,
+                    ("TCPSendDataCallback tot_len = %u, len = %u, TotalSize = %u\n",
+                     p->tot_len, p->len, Packet.TotalSize));
+        ASSERT(p->tot_len == p->len);
+        ASSERT(Packet.TotalSize == p->len);
+    }
 
     RtlCopyMemory(Packet.Header, p->payload, p->len);