alert-debuglog: trigger rotation on non-decoder events as well

The write handling was missed for non-decoder events that
would trigger rotation after a HUP.
pull/1900/head
Jason Ish 10 years ago committed by Victor Julien
parent 75cd1f0bf5
commit 1601222056

@ -321,8 +321,8 @@ static TmEcode AlertDebugLogger(ThreadVars *tv, const Packet *p, void *thread_da
}
SCMutexLock(&aft->file_ctx->fp_mutex);
(void)MemBufferPrintToFPAsString(aft->buffer, aft->file_ctx->fp);
fflush(aft->file_ctx->fp);
aft->file_ctx->Write((const char *)MEMBUFFER_BUFFER(aft->buffer),
MEMBUFFER_OFFSET(aft->buffer), aft->file_ctx);
aft->file_ctx->alerts += p->alerts.cnt;
SCMutexUnlock(&aft->file_ctx->fp_mutex);

Loading…
Cancel
Save