|
|
|
|
@ -188,12 +188,11 @@ int PcapLogRotateFile(ThreadVars *t, PcapLogData *pl)
|
|
|
|
|
SCLogDebug("Removing pcap file %s", pf->filename);
|
|
|
|
|
|
|
|
|
|
if (remove(pf->filename) != 0) {
|
|
|
|
|
SCLogWarning(SC_ERR_PCAP_FILE_DELETE_FAILED,
|
|
|
|
|
"failed to remove log file %s: %s",
|
|
|
|
|
pf->filename, strerror( errno ));
|
|
|
|
|
// VJ remove can fail because file is already gone
|
|
|
|
|
//LogWarning(SC_ERR_PCAP_FILE_DELETE_FAILED,
|
|
|
|
|
// "failed to remove log file %s: %s",
|
|
|
|
|
// pf->filename, strerror( errno ));
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
SCLogDebug("success! removed log file %s", pf->filename);
|
|
|
|
|
|
|
|
|
|
/* Remove directory if Sguil mode and no files left in sguil dir */
|
|
|
|
|
if (pl->mode == LOGMODE_SGUIL) {
|
|
|
|
|
@ -215,7 +214,6 @@ int PcapLogRotateFile(ThreadVars *t, PcapLogData *pl)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TAILQ_REMOVE(&pl->pcap_file_list, pf, next);
|
|
|
|
|
PcapFileNameFree(pf);
|
|
|
|
|
|