Project

General

Profile

Bug #1547 ยป ambiguous_interface_in_thread_name.patch

Jozef Mlich, 09/10/2015 06:05 AM

View differences:

src/util-runmodes.c
/* create the threads */
for (thread = 0; thread < threads_count; thread++) {
snprintf(tname, sizeof(tname), "%s%d", thread_name, thread+1);
snprintf(tname, sizeof(tname), "%s#%d", thread_name, thread+1);
char *thread_name = SCStrdup(tname);
if (unlikely(thread_name == NULL)) {
SCLogError(SC_ERR_MEM_ALLOC, "Can't allocate thread name");
......
threads_count = ModThreadsCount(aconf);
for (thread = 0; thread < threads_count; thread++) {
snprintf(tname, sizeof(tname), "%s%s%d", thread_name,
snprintf(tname, sizeof(tname), "%s%s#%d", thread_name,
live_dev, thread+1);
char *thread_name = SCStrdup(tname);
if (unlikely(thread_name == NULL)) {
......
if (single_mode) {
snprintf(tname, sizeof(tname), "%s", thread_name);
} else {
snprintf(tname, sizeof(tname), "%s%s%d",
snprintf(tname, sizeof(tname), "%s%s#%d",
thread_name, live_dev, thread+1);
}
n_thread_name = SCStrdup(tname);
    (1-1/1)