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,24 +666,25 @@ 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 */
while (s->slot_post_pq.top != NULL) { for (s = slot; s != NULL; s = s->slot_next) {
Packet *extra_p = PacketDequeue(&s->slot_post_pq); while (s->slot_post_pq.top != NULL) {
if (extra_p == NULL) Packet *extra_p = PacketDequeue(&s->slot_post_pq);
continue; if (extra_p == NULL)
if (s->slot_next != NULL) {
r = TmThreadsSlotVarRun(tv, extra_p, s->slot_next);
if (r == TM_ECODE_FAILED) {
TmqhOutputPacketpool(tv, extra_p);
TmThreadsSetFlag(tv, THV_FAILED);
break; break;
}
}
/* output the packet */ if (s->slot_next != NULL) {
tv->tmqh_out(tv, extra_p); r = TmThreadsSlotVarRun(tv, extra_p, s->slot_next);
} if (r == TM_ECODE_FAILED) {
} TmqhOutputPacketpool(tv, extra_p);
TmThreadsSetFlag(tv, THV_FAILED);
break;
}
}
/* output the packet */
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