X-Git-Url: http://git.onelab.eu/?p=distributedratelimiting.git;a=blobdiff_plain;f=drl%2Fstandard.c;h=099e6cd0f96ddc55c0687752e3e7150e2c68a929;hp=cadafee6389a452f91ae69c1a023ab241fc5250a;hb=72b9872d1025afa4e1db53b6bc0d4a00a5afd123;hpb=19bf89f36a91be2fdd4a0b6c7099f7515507e1e1 diff --git a/drl/standard.c b/drl/standard.c index cadafee..099e6cd 100644 --- a/drl/standard.c +++ b/drl/standard.c @@ -75,8 +75,7 @@ standard_flow *standard_table_lookup(standard_flow_table table, const key_flow * 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; } @@ -267,8 +266,6 @@ void standard_table_update_flows(standard_flow_table table, struct timeval now, 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); @@ -295,8 +292,6 @@ void standard_table_update_flows(standard_flow_table table, struct timeval now, 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)); @@ -307,7 +302,6 @@ void standard_table_update_flows(standard_flow_table table, struct timeval now, current->rate); } - //printf("\n"); printlog(LOG_DEBUG, "FLOW:--\n--\n"); table->common->max_flow_rate = maxflowrate;