trafficserver-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Geffon <bgef...@linkedin.com>
Subject RE: inconsistent read IOBuffer results
Date Mon, 02 Jan 2012 19:30:20 GMT
I think you might want TSIOBufferBlockReadAvail and not TSIOBufferReaderAvail.

Brian
________________________________________
From: James Peach [jamespeach@me.com]
Sent: Saturday, December 31, 2011 10:07 PM
To: dev@trafficserver.apache.org
Subject: inconsistent read IOBuffer results

Hi all,

In my proxy code, I have something that looks roughly like this:

        if (TSIOBufferReaderAvail(reader) >= 10) {
                blk = TSIOBufferStart(buffer);
                ptr = (const uint8_t *)TSIOBufferBlockReadStart(blk, reader, &nbytes);

                TSReleaseAssert(nbytes >= 10);
        }

Occasionally, the assertion will trigger; is that something that I should expect and handle?

cheers,
James

Mime
View raw message