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

[or-cvs] r12013: "if (!router_get_trusted_dirservers())" is a bad test: route (in tor/trunk: . src/or)



Author: nickm
Date: 2007-10-18 07:50:20 -0400 (Thu, 18 Oct 2007)
New Revision: 12013

Modified:
   tor/trunk/
   tor/trunk/src/or/config.c
Log:
 r15899@catbus:  nickm | 2007-10-18 07:49:15 -0400
 "if (!router_get_trusted_dirservers())" is a bad test: router_get_trusted_dirservers() always returns a list.  Instead, check for whether the list is empty.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r15899] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2007-10-18 10:05:57 UTC (rev 12012)
+++ tor/trunk/src/or/config.c	2007-10-18 11:50:20 UTC (rev 12013)
@@ -973,7 +973,7 @@
       }
     }
   } else {
-    if (!router_get_trusted_dir_servers())
+    if (!smartlist_len(router_get_trusted_dir_servers()))
       add_default_trusted_dirservers();
   }