142,145d141
<         
< //      printf("addPolicyEntry(cir: %f, cbs: %f)\n", policyTable[policyTableSize].cir, policyTable[policyTableSize].cbs);
< //      printf("   %s %s %s %s %s %s %s %s\n\n", argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
<       fflush(stdout);
165c161
< 
---
>       
217c213
<   printf("ERROR: %d No Policy Table entry found for Source %d-Destination %d.\n", this, source, dest);
---
>   printf("ERROR: No Policy Table entry found for Source %d-Destination %d.\n", source, dest);
235c231,232
<   
---
> 
> 
317c314
< 
---
>   
325,327d321
<   } else {
<     printf("getPolicy() failed\n");
<   }
329,331c323,327
<   if (policy_pool[policy_index]) {
<     policy_pool[policy_index]->applyMeter(policy, pkt);
<     codePt = policy_pool[policy_index]->applyPolicer(policy, policer, pkt);
---
>     // bug pointed by Jason Kenney <jason@linear.engmath.dal.ca>
>     if (policy_pool[policy_index]) {
>       policy_pool[policy_index]->applyMeter(policy, pkt);
>       codePt = policy_pool[policy_index]->applyPolicer(policy, policer, pkt);
>     }
334c330
<     exit(-1);
---
>     exit(-1);    
336c332
< 
---
>   
636,638d631
<   
< //  printf("TBPolicy::applyMeter(cir:%f, cbs:%f)\n", policy->cir, policy->cbs);
<   
665d657
< //    printf("TBPolicy::applyPolicer(initial:%d)\n", policer->initialCodePt);
668d659
< //    printf("TBPolicy::applyPolicer(downgrade:%d)\n", policer->downgrade1);
835c826
<   int fid;
---
>   int fid, src_id, dst_id;
842c833,835
<   
---
>   dst_id = iph->daddr();
>   src_id = iph->saddr();
> 
843a837
>   //  printFlowTable();
848a843
>     //if (p->src_id == src_id && p->dst_id == dst_id ) {
880a876,877
>     new_entry->src_id = src_id;
>     new_entry->dst_id = dst_id;
902a900
>   int fid, src_id, dst_id;
903a902
> 
905c904,907
<   
---
>   fid = iph->flowid();
>   dst_id = iph->daddr();
>   src_id = iph->saddr();
> 
907c909
<   //  printFlowTable();
---
>   //printFlowTable();
912a915
>       //if (p->src_id == src_id && p->dst_id == dst_id) {
951c954
<     printf ("MISS: no flow %d in the table\n", iph->flowid());
---
>     printf ("MISS: no flow %d (%d, %d) in the table\n", fid, src_id, dst_id);
966c969,970
<     printf("flow id: %d, bytesSent: %d, last_update: %f\n", p->fid, p->bytes_sent, p->last_update);
---
>     printf("flow id: %d [%d %d], bytesSent: %d, last_update: %f\n", 
> 	   p->fid, p->src_id, p->dst_id, p->bytes_sent, p->last_update);
