if (flow == NULL) {
flow = malloc(sizeof(standard_flow));
if (flow == NULL) {
- printf("Malloc returned null.\n");
- printlog(LOG_CRITICAL, "ALLOC: Malloc returned NULL.\n");
+ printlog(LOG_CRITICAL, "standard.c: Malloc returned NULL.\n");
return NULL;
}
table->common->bytes_since = 0;
table->common->last_update = now;
- //printf("Flows: ");
-
/* Update per-flow information. */
for (current = table->flows_head; current; current = current->next) {
time_delta = timeval_subtract(now, current->last_update);
maxflowrate = current->rate;
}
- //printf("%d, ", current->rate);
-
src.s_addr = ntohl(current->source_ip);
dst.s_addr = ntohl(current->dest_ip);
strcpy(sip, inet_ntoa(src));
current->rate);
}
- //printf("\n");
printlog(LOG_DEBUG, "FLOW:--\n--\n");
table->common->max_flow_rate = maxflowrate;