]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
unix-manager: fix thread killing function
authorEric Leblond <eric@regit.org>
Sat, 23 Feb 2013 11:31:17 +0000 (12:31 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 26 Feb 2013 11:32:48 +0000 (12:32 +0100)
The name of the thread was not searched in the correct family.

Reported-by: iswalker <mail2cissp@gmail.com>
src/unix-manager.c

index adc5539c0f4d22f8ef7dc7c4761b0cff1fe839a4..5c7aa2fd1d49532f5ef32735511231a8d34a6db1 100644 (file)
@@ -917,7 +917,7 @@ void UnixManagerThreadSpawn(DetectEngineCtx *de_ctx, int mode)
 /**
  * \brief Used to kill unix manager thread(s).
  *
- * \todo Kinda hackish since it uses the tv name to identify flow manager
+ * \todo Kinda hackish since it uses the tv name to identify unix manager
  *       thread.  We need an all weather identification scheme.
  */
 void UnixSocketKillSocketThread(void)
@@ -926,8 +926,8 @@ void UnixSocketKillSocketThread(void)
 
     SCMutexLock(&tv_root_lock);
 
-    /* flow manager thread(s) is/are a part of mgmt threads */
-    tv = tv_root[TVT_MGMT];
+    /* unix manager thread(s) is/are a part of command threads */
+    tv = tv_root[TVT_CMD];
 
     while (tv != NULL) {
         if (strcasecmp(tv->name, "UnixManagerThread") == 0) {