[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Fix bug where OPs would try to generate descriptor and crash.
Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv12887/src/or
Modified Files:
router.c
Log Message:
Fix bug where OPs would try to generate descriptor and crash.
Index: router.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -p -d -r1.236 -r1.237
--- router.c 3 Jan 2006 23:34:42 -0000 1.236
+++ router.c 6 Jan 2006 15:40:34 -0000 1.237
@@ -587,7 +587,12 @@ decide_if_publishable_server(time_t now)
void
consider_publishable_server(time_t now, int force)
{
- int rebuilt = router_rebuild_descriptor(0);
+ int rebuilt;
+
+ if (!server_mode(get_options()))
+ return;
+
+ rebuilt = router_rebuild_descriptor(0);
if (decide_if_publishable_server(now)) {
set_server_advertised(1);
if (rebuilt == 0)