support post pq packet processing in var slot

remotes/origin/master-1.1.x
Anoop Saldanha 14 years ago committed by Victor Julien
parent cc4e89fbe1
commit acbcee69ff

@ -471,8 +471,6 @@ TmEcode TmThreadsSlotVarRun(ThreadVars *tv, Packet *p,
} }
tv->tmqh_out(tv, extra_p); tv->tmqh_out(tv, extra_p);
} }
/** \todo XXX post pq */
} }
return TM_ECODE_OK; return TM_ECODE_OK;
@ -668,10 +666,11 @@ void *TmThreadsSlotVar(void *td)
tv->tmqh_out(tv, p); tv->tmqh_out(tv, p);
/* now handle the post_pq packets */ /* now handle the post_pq packets */
for (s = slot; s != NULL; s = s->slot_next) {
while (s->slot_post_pq.top != NULL) { while (s->slot_post_pq.top != NULL) {
Packet *extra_p = PacketDequeue(&s->slot_post_pq); Packet *extra_p = PacketDequeue(&s->slot_post_pq);
if (extra_p == NULL) if (extra_p == NULL)
continue; break;
if (s->slot_next != NULL) { if (s->slot_next != NULL) {
r = TmThreadsSlotVarRun(tv, extra_p, s->slot_next); r = TmThreadsSlotVarRun(tv, extra_p, s->slot_next);
@ -681,11 +680,11 @@ void *TmThreadsSlotVar(void *td)
break; break;
} }
} }
/* output the packet */ /* output the packet */
tv->tmqh_out(tv, extra_p); tv->tmqh_out(tv, extra_p);
} } /* while (s->slot_post_pq.top != NULL) */
} } /* for (s = slot; s != NULL; s = s->slot_next) */
} /* if (p != NULL) */
if (TmThreadsCheckFlag(tv, THV_KILL)) { if (TmThreadsCheckFlag(tv, THV_KILL)) {
run = 0; run = 0;

Loading…
Cancel
Save