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

[or-cvs] fix typo



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv22742/or

Modified Files:
	config.c 
Log Message:
fix typo

Index: config.c
===================================================================
RCS file: /home/or/cvsroot/src/or/config.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -d -r1.164 -r1.165
--- config.c	13 Oct 2004 18:28:38 -0000	1.164
+++ config.c	13 Oct 2004 19:53:10 -0000	1.165
@@ -397,6 +397,10 @@
     return -1;
   }
 
+  return 0;
+}
+
+static void add_default_trusted_dirservers(void) {
   /* moria1 */
   parse_dir_server_line("18.244.0.188:9031 "
                         "FFCB 46DB 1339 DA84 674C 70D7 CB58 6434 C437 0441");
@@ -406,8 +410,6 @@
   /* tor26 */
   parse_dir_server_line("62.116.124.106:9030 "
                         "847B 1F85 0344 D787 6491 A548 92F9 0493 4E4E B85D");
-
-  return 0;
 }
 
 /** Set <b>options</b> to a reasonable default.
@@ -892,9 +894,15 @@
     }
   }
 
-  for (cl = options->DirServers; cl; cl = cl->next) {
-    if (parse_dir_server_line(cl->value)<0)
-      return -1;
+  
+  clear_trusted_dir_servers();
+  if (!options->DirServers) {
+    add_default_trusted_dirservers();
+  } else {
+    for (cl = options->DirServers; cl; cl = cl->next) {
+      if (parse_dir_server_line(cl->value)<0)
+        return -1;
+    }
   }
 
   /* XXX look at the various nicknamelists and make sure they're