Cleaned up a lot of printing.
[distributedratelimiting.git] / drl / standard.c
index cadafee..099e6cd 100644 (file)
@@ -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;