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

[or-cvs] fix assert: if our dirport isn"t reachable yet, don"t trick



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

Modified Files:
	router.c 
Log Message:
fix assert: if our dirport isn't reachable yet, don't trick
*ourselves* into thinking the dirport is zero. but continue
to tell other people that it is.


Index: router.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- router.c	1 Apr 2005 07:09:18 -0000	1.163
+++ router.c	1 Apr 2005 07:42:32 -0000	1.164
@@ -680,7 +680,7 @@
   ri->nickname = tor_strdup(options->Nickname);
   ri->addr = addr;
   ri->or_port = options->ORPort;
-  ri->dir_port = (hibernating || !check_whether_dirport_reachable()) ?
+  ri->dir_port = hibernating ?
                  0 : options->DirPort;
   ri->published_on = time(NULL);
   ri->onion_pkey = crypto_pk_dup_key(get_onion_key()); /* must invoke from main thread */
@@ -830,7 +830,7 @@
     router->nickname,
     router->address,
     router->or_port,
-    router->dir_port,
+    check_whether_dirport_reachable ? router->dir_port : 0,
     router->platform,
     published,
     fingerprint,