On 05/16/2013 10:59 AM, Anoop Saldanha wrote:
> In src/detect-engine-hcbd.c:
> 
>>  
>> -    return 0;
>> + end:
>> +    if (app_stage_status == APP_STAGE_DONE)
> 
> Because GetProgress() requires me to supply a transaction and since the
> buffering does the job of retrieving a tx, I didn't want to waste cycles
> getting it. Getting a tx happens in linear time on the array, so not
> very happy about it.

Think it could make sense to move the tx retrieval to this calling
function and then pass it to the DetectEngineHCBDGetBufferForTX function.

As a side thought: getting the tx should probably be at a low level in
the call stack. Currently we pass the tx_id around, but maybe it would
make more sense to pass the tx ptr around from the detect engine, or both.