[Snort-devel] small patch to alert output in version 1.9.0beta6

Lawrence Reed Lawrence.Reed at ...1489...
Mon Aug 19 07:26:02 EDT 2002


I am currently using the alert file with full format and noticed that 
alerts with Xrefs do not have a blank line after them.   Here is a small 
patch I use to get the blank lines more consistant.


--- src/log.c    Fri Jun 21 09:55:06 2002
+++ src-new/log.c    Mon Aug 19 10:08:50 2002
@@ -1680,7 +1680,8 @@
  * Returns: void function
  */
 void PrintXrefs(FILE *fp, int do_newline)
-{
+{  
+    int checknewline = 0;
     ReferenceNode *refNode = NULL;
 
     if(otn_tmp)
@@ -1691,7 +1692,9 @@
         {
             FPrintReference(fp, refNode);
             refNode = refNode->next;
+            checknewline = 1;
         }
+        if ( do_newline && checknewline ) fprintf(fp,"\n");
     }
 }






More information about the Snort-devel mailing list