Jeffrey Dungen

OpenTCP Bug Fix Thread

Discussion created by Jeffrey Dungen on Aug 14, 2007
Latest reply on Jun 18, 2011 by Jerome GUEUNIER
Alright, so perhaps I'm the last person to still be using OpenTCP on the NE64, but I thought it might be nice if there were a bug fix thread on this forum since there don't seem to be too many other resources on the web...


In void arp_get_response(void) :

for( i=1; i<ARP_TSIZE; i++ )

Should be changed to:

for( i=0; i<ARP_TSIZE; i++ )

 Arrays in C are indexed starting at zero, not one.  Your application will never be able to add the first target to its ARP table because of this.  :smileymad:

Other notes

If you're like me and used the Connector App as a starting point for your project, notice that you will have call RTI_Init() somewhere before you call RTI_Enable() in order for real-time interrupts to actually occur.  In main.c of the Connector App, this call is not made, and there are no real-time interrupts.  This causes unpredictable behaviour on all of the OpenTCP services which rely on real-time interrupts.  :smileysurprised:

I promise to paste in any other fixes I make.  Feel free to post your fixes here too.  :smileywink: