Counters: fix unix socket

pull/607/head
Victor Julien 12 years ago
parent 25aeeebdf7
commit 76c305c128

@ -724,9 +724,6 @@ TmEcode SCPerfOutputCounterSocket(json_t *cmd,
uint64_t ui64_temp = 0; uint64_t ui64_temp = 0;
uint64_t ui64_result = 0; uint64_t ui64_result = 0;
double double_temp = 0;
double double_result = 0;
uint32_t u = 0; uint32_t u = 0;
int flag = 0; int flag = 0;
@ -769,7 +766,7 @@ TmEcode SCPerfOutputCounterSocket(json_t *cmd,
SCMutexLock(&pctmi->head[u]->m); SCMutexLock(&pctmi->head[u]->m);
while(pc_heads[u] != NULL && strcmp(pctmi->tm_name, pc_heads[u]->name->tm_name)) { while(pc_heads[u] != NULL && strcmp(pctmi->tm_name, pc_heads[u]->tm_name)) {
pc_heads[u] = pc_heads[u]->next; pc_heads[u] = pc_heads[u]->next;
} }
} }
@ -777,7 +774,6 @@ TmEcode SCPerfOutputCounterSocket(json_t *cmd,
flag = 1; flag = 1;
while(flag) { while(flag) {
ui64_result = 0; ui64_result = 0;
double_result = 0;
if (pc_heads[0] == NULL) if (pc_heads[0] == NULL)
break; break;
pc = pc_heads[0]; pc = pc_heads[0];
@ -793,7 +789,7 @@ TmEcode SCPerfOutputCounterSocket(json_t *cmd,
} }
filled = 1; filled = 1;
json_object_set_new(jdata, pc->name->cname, json_integer(ui64_result)); json_object_set_new(jdata, pc->cname, json_integer(ui64_result));
} }
for (u = 0; u < pctmi->size; u++) for (u = 0; u < pctmi->size; u++)

@ -62,14 +62,6 @@ enum {
SC_PERF_IFACE_MAX, SC_PERF_IFACE_MAX,
}; };
/**
* \brief Name of the counter. Basically like a primary key for a counter
*/
typedef struct SCPerfCounterName_ {
char *cname;
char *tm_name;
} SCPerfCounterName;
/** /**
* \brief Container to hold the counter variable * \brief Container to hold the counter variable
*/ */

@ -876,7 +876,7 @@ void *UnixManagerThread(void *td)
close(item->fd); close(item->fd);
SCFree(item); SCFree(item);
} }
SCPerfSyncCounters(th_v, 0); SCPerfSyncCounters(th_v);
break; break;
} }

Loading…
Cancel
Save