Eric Seale writes:
> Here is an attached example from a developer.

The problem is in his code.  Specifically, when he calls getmsg(), he
fails to check the returned value for MORECTL and MOREDATA responses.

When he sends DL_INFO_REQ, he's not allocating a buffer large enough
to hold the DL_INFO_ACK response.  This leaves some of the (M_PCPROTO)
data sitting at the stream head.  When he next goes to poll, he sees
the left-over (unread) data from that attempt, and that causes the
confusion.

The fix is to bump up the size of dlbuf so that it's adequate to hold
the expected responses, and/or check for MORECTL and MOREDATA when
using getmsg().

-- 
James Carlson, KISS Network                    <[EMAIL PROTECTED]>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to