[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r16524: {tor} Fix condition statement for accept items, fix two asserts (tor/trunk/src/or)



Author: weasel
Date: 2008-08-13 08:45:44 -0400 (Wed, 13 Aug 2008)
New Revision: 16524

Modified:
   tor/trunk/src/or/policies.c
Log:
Fix condition statement for accept items, fix two asserts

Modified: tor/trunk/src/or/policies.c
===================================================================
--- tor/trunk/src/or/policies.c	2008-08-13 12:45:34 UTC (rev 16523)
+++ tor/trunk/src/or/policies.c	2008-08-13 12:45:44 UTC (rev 16524)
@@ -967,8 +967,8 @@
 
   old->prt_max = new_starts-1;
 
-  tor_assert(old->prt_min < old->prt_max);
-  tor_assert(new->prt_min < new->prt_max);
+  tor_assert(old->prt_min <= old->prt_max);
+  tor_assert(new->prt_min <= new->prt_max);
   return new;
 }
 
@@ -1054,7 +1054,7 @@
 policy_summary_add_item(smartlist_t *summary, addr_policy_t *p)
 {
   if (p->policy_type == ADDR_POLICY_ACCEPT) {
-    if (p->maskbits != 0) {
+    if (p->maskbits == 0) {
       policy_summary_accept(summary, p->prt_min, p->prt_max);
     }
   } else if (p->policy_type == ADDR_POLICY_REJECT) {