[En-Nut-Discussion] TCP bug
Ralph Mason
ralph.mason at telogis.com
Mon Jul 28 07:21:29 CEST 2003
Well here is another Use for NutEventPostAsync
When you accept using NutTcpAcept if the Accepting thread priority is higher
than the TCP state machine thread you get a returned socket that is not
established.
So Receive returns -1.
>From tcpsm.c
break;
case TCPS_ESTABLISHED:
/*
* ACK of SYN received.
*/
/* wake up accepting thread on passive socket. */
***** NutEventPost(&sock->so_pc_tq);
break;
case TCPS_FIN_WAIT_1:
Context switch happens at the **** before the accpet is finished.
A NutEventPostAsync fixes this.
Regards,
Ralph
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
More information about the En-Nut-Discussion
mailing list