From 975ebf2e4fc97341f4078e84acbce0165192f333 Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Wed, 17 Aug 2011 21:06:49 +0530 Subject: [PATCH] Minor changes to move function calls that kills threads + frees resources to the clean up phase right to the end of main thread --- src/suricata.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/suricata.c b/src/suricata.c index f457328c63..209510b85e 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -1485,12 +1485,6 @@ int main(int argc, char **argv) SCLogInfo("time elapsed %" PRIuMAX "s", (uintmax_t)(end_time.tv_sec - start_time.tv_sec)); -#ifdef __SC_CUDA_SUPPORT__ - SCCudaPBKillBatchingPackets(); -#endif - - TmThreadKillThreads(); - SCPerfReleaseResources(); break; } @@ -1503,6 +1497,12 @@ int main(int argc, char **argv) SC_ATOMIC_CAS(&engine_stage, SURICATA_RUNTIME, SURICATA_DEINIT); +#ifdef __SC_CUDA_SUPPORT__ + SCCudaPBKillBatchingPackets(); +#endif + + TmThreadKillThreads(); + SCPerfReleaseResources(); FlowShutdown(); FlowPrintQueueInfo(); StreamTcpFreeConfig(STREAM_VERBOSE);