From e8f95576647f8cdfaebb7a7db47b981d70d14d84 Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Tue, 6 Sep 2011 12:54:04 +0530 Subject: [PATCH] fastlog print updates. combine the io write --- src/alert-fastlog.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/alert-fastlog.c b/src/alert-fastlog.c index dd19af8497..86567f9958 100644 --- a/src/alert-fastlog.c +++ b/src/alert-fastlog.c @@ -154,19 +154,16 @@ TmEcode AlertFastLogIPv4(ThreadVars *tv, Packet *p, void *data, PacketQueue *pq, if (SCProtoNameValid(IPV4_GET_IPPROTO(p)) == TRUE) { fprintf(aft->file_ctx->fp, "%s %s[**] [%" PRIu32 ":%" PRIu32 ":%" PRIu32 "] %s [**] [Classification: %s] [Priority: %"PRIu32"]" - " {%s} %s:%" PRIu32 " -> %s:%" PRIu32 "", timebuf, action, + " {%s} %s:%" PRIu32 " -> %s:%" PRIu32 "\n", timebuf, action, pa->s->gid, pa->s->id, pa->s->rev, pa->s->msg, pa->s->class_msg, pa->s->prio, known_proto[IPV4_GET_IPPROTO(p)], srcip, p->sp, dstip, p->dp); } else { fprintf(aft->file_ctx->fp, "%s %s[**] [%" PRIu32 ":%" PRIu32 ":%" PRIu32 "] %s [**] [Classification: %s] [Priority: %"PRIu32"]" - " {PROTO:%03" PRIu32 "} %s:%" PRIu32 " -> %s:%" PRIu32 "", timebuf, + " {PROTO:%03" PRIu32 "} %s:%" PRIu32 " -> %s:%" PRIu32 "\n", timebuf, action, pa->s->gid, pa->s->id, pa->s->rev, pa->s->msg, pa->s->class_msg, pa->s->prio, IPV4_GET_IPPROTO(p), srcip, p->sp, dstip, p->dp); } - - fprintf(aft->file_ctx->fp,"\n"); - fflush(aft->file_ctx->fp); } SCMutexUnlock(&aft->file_ctx->fp_mutex);