Hi all!
I try to use the SCTPlib-1.0-pre8 to recive UDP packages without using the SCTP part. We need this to have the same interface to the scheduling in both cases with SCTP and without.
In addition to the Problems Martin Held posted here a sort time before, the lines 622ff in adaptation.c looks wrong. I think you want to reach line 628 if sctp_sfd == 0 or if the poll_fds[i].fd != sctp_sfd and the same for IPv6. In this case the lines should read:
if ( ((sctp_sfd !=0) || (poll_fds[i].fd != sctp_sfd))
#ifdef HAVE_IPV6
&& ((sctpv6_sfd != 0) || (poll_fds[i].fd != sctpv6_sfd))
#endif
){
Note the "or" instate of the "and" in the two subexpressions.
Anyway the useage of 0 for an invalid sctp file descriptor is problematic. Wouldn't it be better to initialize it to -1, which you get if the open fails. Then you do not need the first part in the test.
Regads
Bernd Salbrechter
Archive powered by MHonArc 2.6.19+.