From 58b595cc21ccdcad845c86e03ddeb38fb6147a76 Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Tue, 6 Sep 2011 17:02:02 +0530 Subject: [PATCH] fastlog print updates for ipv6. combine the io write --- src/alert-fastlog.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/alert-fastlog.c b/src/alert-fastlog.c index 86567f9958..d1a2932dbe 100644 --- a/src/alert-fastlog.c +++ b/src/alert-fastlog.c @@ -208,7 +208,7 @@ TmEcode AlertFastLogIPv6(ThreadVars *tv, Packet *p, void *data, PacketQueue *pq, if (SCProtoNameValid(IPV6_GET_L4PROTO(p)) == TRUE) { fprintf(aft->file_ctx->fp, "%s %s[**] [%" PRIu32 ":%" PRIu32 ":%" "" PRIu32 "] %s [**] [Classification: %s] [Priority: %" - "" PRIu32 "] {%s} %s:%" PRIu32 " -> %s:%" PRIu32 "", timebuf, + "" PRIu32 "] {%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[IPV6_GET_L4PROTO(p)], srcip, p->sp, dstip, p->dp); @@ -216,13 +216,11 @@ TmEcode AlertFastLogIPv6(ThreadVars *tv, Packet *p, void *data, PacketQueue *pq, } else { fprintf(aft->file_ctx->fp, "%s %s[**] [%" PRIu32 ":%" PRIu32 ":%" "" PRIu32 "] %s [**] [Classification: %s] [Priority: %" - "" PRIu32 "] {PROTO:%03" PRIu32 "} %s:%" PRIu32 " -> %s:%" PRIu32 "", + "" PRIu32 "] {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, IPV6_GET_L4PROTO(p), srcip, p->sp, dstip, p->dp); } - fprintf(aft->file_ctx->fp,"\n"); - fflush(aft->file_ctx->fp); } SCMutexUnlock(&aft->file_ctx->fp_mutex);