I'm calling TCPIPReadLineTCP like this:
rv = TCPIPReadLineTCP(ipid,
"\p\r\n",
2,
NULL,
0xffff,
&rb);
to allocate a new handle and return data in that.
Occasionally, rlrBuffCount and rlrBuffSize do not match GetHandleSize() on the returned handle. (they are significantly higher).
eg, GetHandleSize is 0x0011, the others are 0x0930
Looking at the memory, :RECEIVESIZE is correct (0x11), :RETURNSIZE is incorrect (0x0930). Looking at the code, I don't see how that could happen.
(This is in sweet 16 2.3 with the sweet 16 link layer)
I tracked down the problem:
I.TCP.S:
1251 * Get last index into buffer to search for delimit
1252
1253 LDA :RECEIVESIZE
1254 SEC
1255 SBC :STRINGLEN
1256 STA :INDEX
1257 LDA :RECEIVESIZE <<< should be RECEIVESIZE+2
1258 SBC #0
1259 STA :INDEX+2
:RECEIVESIZE is 11. :STRINGLEN is 2.
The above code sets :INDEX to $0011000f rather than $0000000f, so it ends up searching way beyond the end of the string for a delimiter if the data in the queue does not include the delimiter (which, in my case, it did not).
Kelvin