Commits

Anonymous committed b43989e Draft

Not storing keepalives on archive.log

Comments (0)

Files changed (2)

src/analysisd/alerts/log.c

  */
 void OS_Store(Eventinfo *lf)
 {
+
+    if(strcmp(lf->location, "ossec-keepalive") == 0)
+    {
+        return;
+    }
     fprintf(_eflog,
             "%d %s %02d %s %s%s%s %s\n",
             lf->year,

src/logcollector/read_ossecalert.c

         char *tmp_msg = NULL;
         short int j = 0;
         
-        tmp_msg = os_LoadString(tmp_msg, al_data->log[0]);
-        if(tmp_msg == NULL)
-        {
-            FreeAlertData(al_data);
-            return(NULL);
-        }
         while(al_data->log[j] != NULL)
         {
             tmp_msg = os_LoadString(tmp_msg, al_data->log[j]);
+            tmp_msg = os_LoadString(tmp_msg, "\n");
             if(tmp_msg == NULL)
             {
                 FreeAlertData(al_data);