Changed naming of flowmanager/recycler.

- Changed FlowManagerThread to FM-
- Changed FlowRecyclerThread to FR-
- Changed use of strcasecmp to strncasecmp. This was used in the
  killing and disabling of FM/FR Threads.
pull/2050/head
maxtors 10 years ago committed by Victor Julien
parent a17ac21077
commit a6adb5dbbf

@ -122,7 +122,7 @@ void FlowDisableFlowManagerThread(void)
tv = tv_root[TVT_MGMT];
while (tv != NULL) {
if (strcasecmp(tv->name, "FlowManagerThread") == 0) {
if (strncasecmp(tv->name, "FM", 2) == 0) {
TmThreadsSetFlag(tv, THV_KILL);
cnt++;
@ -734,10 +734,10 @@ void FlowManagerThreadSpawn()
for (u = 0; u < flowmgr_number; u++) {
ThreadVars *tv_flowmgr = NULL;
char name[32];
snprintf(name, sizeof(name), "FlowManagerThread%02u", u+1);
char name[32] = "";
snprintf(name, sizeof(name), "FM%02u", u+1);
tv_flowmgr = TmThreadCreateMgmtThreadByName("FlowManagerThread",
tv_flowmgr = TmThreadCreateMgmtThreadByName(SCStrdup(name),
"FlowManager", 0);
BUG_ON(tv_flowmgr == NULL);
@ -897,10 +897,15 @@ void FlowRecyclerThreadSpawn()
for (u = 0; u < flowrec_number; u++) {
ThreadVars *tv_flowmgr = NULL;
<<<<<<< HEAD
char name[32];
snprintf(name, sizeof(name), "FlowRecyclerThread%02u", u+1);
=======
char name[32] = "";
snprintf(name, sizeof(name), "FR%02u", u+1);
>>>>>>> Changed naming of flowmanager/recycler.
tv_flowmgr = TmThreadCreateMgmtThreadByName("FlowRecyclerThread",
tv_flowmgr = TmThreadCreateMgmtThreadByName(SCStrdup(name),
"FlowRecycler", 0);
BUG_ON(tv_flowmgr == NULL);
@ -952,7 +957,7 @@ void FlowDisableFlowRecyclerThread(void)
tv = tv_root[TVT_MGMT];
while (tv != NULL) {
if (strcasecmp(tv->name, "FlowRecyclerThread") == 0) {
if (strncasecmp(tv->name, "FR", 2) == 0) {
TmThreadsSetFlag(tv, THV_KILL);
cnt++;

@ -1793,6 +1793,7 @@ void TmThreadFree(ThreadVars *tv)
}
TmThreadsUnregisterThread(tv->id);
SCFree(tv->name);
SCFree(tv);
}

Loading…
Cancel
Save