static PHGlobalList s_handlers;
static PHList s_trash;
+static THREAD_LOCAL bool s_clear = false;
struct FrameworkConfig
{
// FIXIT-M need list of gadgets for ambiguous wizardry
else if ( flow->gadget && PacketHasPAFPayload(p) )
+ {
flow->gadget->eval(p);
+ s_clear = true;
+ }
}
void InspectorManager::execute(Packet* p)
void InspectorManager::clear(Packet* p)
{
- if ( p->flow && p->flow->gadget )
+ if ( !s_clear )
+ return;
+
+ if ( p->flow and p->flow->gadget )
p->flow->gadget->clear(p);
+
+ s_clear = false;
}
)
flags |= PKT_PDU_TAIL;
- const StreamBuffer* sb = nullptr;
-
- // FIXIT-M force handling to work around nhttp
- if ( st->flags & TF_FORCE_FLUSH )
- {
- memcpy(flushbuf, ss->payload, bytes_to_copy);
- s5_pkt->dsize += bytes_to_copy;
- bytes_copied = bytes_to_copy;
- }
- else
- {
- sb = st->splitter->reassemble(
- p->flow, total, bytes_flushed, ss->payload, bytes_to_copy, flags, bytes_copied);
- }
+ const StreamBuffer* sb = st->splitter->reassemble(
+ p->flow, total, bytes_flushed, ss->payload, bytes_to_copy, flags, bytes_copied);
flags = 0;