A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.

Dependents:   oldheating gps motorhome heating

Revision:
163:f063e374cf2a
Parent:
159:3ebef2d02f7f
Child:
164:84b20bcd0941
--- a/tcp/tcpsend.c	Wed Mar 11 15:59:49 2020 +0000
+++ b/tcp/tcpsend.c	Fri Mar 13 15:56:33 2020 +0000
@@ -207,19 +207,11 @@
         return DO_NOTHING;
     }
 
-    //Check and make available the remote AR index
-    if (pTcb->remArIndex < 0)
-    {
-        log(pTcb->remPort, "missing remote AR index -> reaping TCB");
-        pTcb->state = TCB_EMPTY;
-        return DO_NOTHING;
-    }
-    *pRemArIndex = pTcb->remArIndex;
-    
-    //Return the local IP scope
+    //Return the remote AR index and the local IP scope
+    if (pRemArIndex) *pRemArIndex = pTcb->remArIndex;
     if (pLocIpScope) *pLocIpScope = pTcb->locIpScope;
             
-    //Reap old ones
+    //Reap broken links 
     if (MsTimerRelative(pTcb->timeLastRcvd, TIMEOUT_BROKEN_LINK_MS))
     {
         log(pTcb->remPort, "broken link -> reaping TCB");