get a new empty block.
I switched to TSIOBufferReaderStart() and haven't been able to repro yet ...
very promising!
thanks,
James
>
>
> Brian
>
>
> From: James Peach [jamespe...@me.com]
> Sent: Monday, January 02, 2012 6:47 PM
__
From: James Peach [jamespe...@me.com]
Sent: Monday, January 02, 2012 6:47 PM
To: dev@trafficserver.apache.org
Subject: Re: inconsistent read IOBuffer results
On 02/01/2012, at 6:13 PM, Brian Geffon wrote:
> My last email was incorrect, it will correctly re
n any indication that TSIOBufferReaderAvail() is advisory.
>>>
>>> static size_t
>>> count_bytes_available(
>>> TSIOBuffer buffer,
>>> TSIOBufferReaderreader)
>>> {
>>> TSIOBufferBlock block;
>>> size_t count = 0;
rBlockReadStart(block, reader, &nbytes);
>> if (ptr && nbytes) {
>>count += nbytes;
>>}
>>
>>block = TSIOBufferBlockNext(block);
>>}
>>
>>return count;
>> }
>>
>>>
>>> thanks
4_t nbytes = 0;
>>
>>ptr = TSIOBufferBlockReadStart(block, reader, &nbytes);
>>if (ptr && nbytes) {
>>count += nbytes;
>>}
>>
>>block = TSIOBufferBlockNext(block);
>>}
>>
>>r
ptr = TSIOBufferBlockReadStart(block, reader, &nbytes);
> if (ptr && nbytes) {
> count += nbytes;
> }
>
> block = TSIOBufferBlockNext(block);
> }
>
> return count;
> }
>
>>
>> thanks,
>> James
>>
_
>> From: James Peach [jamespe...@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 some
ext() if the first buffer block doesn't have all the data.
thanks,
James
>
> Brian
>
> From: James Peach [jamespe...@me.com]
> Sent: Saturday, December 31, 2011 10:07 PM
> To: dev@trafficserver.apache.org
> Subject: inconsistent
I think you might want TSIOBufferBlockReadAvail and not TSIOBufferReaderAvail.
Brian
From: James Peach [jamespe...@me.com]
Sent: Saturday, December 31, 2011 10:07 PM
To: dev@trafficserver.apache.org
Subject: inconsistent read IOBuffer results
Hi all,
In
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(nbyte
10 matches
Mail list logo