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

[or-cvs] maybe resolve an assert trigger i just got:



Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or

Modified Files:
	connection_edge.c 
Log Message:
maybe resolve an assert trigger i just got:
connection_edge.c:643 address_is_in_virtual_range: Assertion addr failed; aborting.
nick, what do you think?


Index: connection_edge.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.301
retrieving revision 1.302
diff -u -d -r1.301 -r1.302
--- connection_edge.c	19 Mar 2005 06:57:15 -0000	1.301
+++ connection_edge.c	23 Mar 2005 00:19:51 -0000	1.302
@@ -551,12 +551,12 @@
     }
     return;
   }
-  if (ent) { /* we'll replace it */
+  if (ent && ent->new_address) { /* we'll replace it */
     if (address_is_in_virtual_range(ent->new_address)) {
       addressmap_virtaddress_remove(address, ent);
     }
     tor_free(ent->new_address);
-  } else { /* make a new one and register it */
+  } else if (!ent) { /* make a new one and register it */
     ent = tor_malloc_zero(sizeof(addressmap_entry_t));
     strmap_set(addressmap, address, ent);
   }