#include "host.h"
#include "defrag.h"
+#include "util-profiling.h"
+
static const char *default_mode = NULL;
int unix_socket_mode_is_running = 0;
StreamTcpFreeConfig(STREAM_VERBOSE);
DefragDestroy();
TmqResetQueues();
+#ifdef PROFILING
+ if (profiling_rules_enabled)
+ SCProfilingDump();
+ SCProfilingDestroy();
+#endif
}
if (!TAILQ_EMPTY(&this->files)) {
PcapFiles *cfile = TAILQ_FIRST(&this->files);
return TM_ECODE_FAILED;
}
PcapFilesFree(cfile);
+#ifdef PROFILING
+ SCProfilingRulesGlobalInit();
+ SCProfilingKeywordsGlobalInit();
+ SCProfilingInit();
+#endif /* PROFILING */
DefragInit();
FlowInitConfig(FLOW_QUIET);
StreamTcpInitConfig(STREAM_VERBOSE);
CIDRInit();
SigParsePrepare();
#ifdef PROFILING
- SCProfilingRulesGlobalInit();
- SCProfilingKeywordsGlobalInit();
- SCProfilingInit();
+ if (suri->run_mode != RUNMODE_UNIX_SOCKET) {
+ SCProfilingRulesGlobalInit();
+ SCProfilingKeywordsGlobalInit();
+ SCProfilingInit();
+ }
#endif /* PROFILING */
SCReputationInitCtx();
SCProtoNameInit();
#endif
#ifdef PROFILING
- if (profiling_rules_enabled)
- SCProfilingDump();
- SCProfilingDestroy();
+ if (suri.run_mode != RUNMODE_UNIX_SOCKET) {
+ if (profiling_rules_enabled)
+ SCProfilingDump();
+ SCProfilingDestroy();
+ }
#endif
#ifdef OS_WIN32
if (profiling_packets_csv_enabled) {
if (packet_profile_csv_fp != NULL)
fclose(packet_profile_csv_fp);
+ packet_profile_csv_fp = NULL;
}
if (profiling_csv_file_name != NULL)
SCFree(profiling_csv_file_name);
+ profiling_csv_file_name = NULL;
if (profiling_file_name != NULL)
SCFree(profiling_file_name);
+ profiling_file_name = NULL;
#ifdef PROFILE_LOCKING
LockRecordFreeHash();