| 
														
															@@ -4918,6 +4918,7 @@ hid_serv_get_responsible_directories(smartlist_t *responsible_dirs, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 { 
														 | 
														
														 | 
														
															 { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   int start, found, n_added = 0, i; 
														 | 
														
														 | 
														
															   int start, found, n_added = 0, i; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   networkstatus_t *c = networkstatus_get_latest_consensus(); 
														 | 
														
														 | 
														
															   networkstatus_t *c = networkstatus_get_latest_consensus(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  int use_begindir = get_options()->TunnelDirConns; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   if (!c || !smartlist_len(c->routerstatus_list)) { 
														 | 
														
														 | 
														
															   if (!c || !smartlist_len(c->routerstatus_list)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     log_warn(LD_REND, "We don't have a consensus, so we can't perform v2 " 
														 | 
														
														 | 
														
															     log_warn(LD_REND, "We don't have a consensus, so we can't perform v2 " 
														 | 
													
												
											
												
													
														| 
														 | 
														
															              "rendezvous operations."); 
														 | 
														
														 | 
														
															              "rendezvous operations."); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -4930,9 +4931,14 @@ hid_serv_get_responsible_directories(smartlist_t *responsible_dirs, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   do { 
														 | 
														
														 | 
														
															   do { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     routerstatus_t *r = smartlist_get(c->routerstatus_list, i); 
														 | 
														
														 | 
														
															     routerstatus_t *r = smartlist_get(c->routerstatus_list, i); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if (r->is_hs_dir) { 
														 | 
														
														 | 
														
															     if (r->is_hs_dir) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      smartlist_add(responsible_dirs, r); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      if (r->dir_port || use_begindir) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        smartlist_add(responsible_dirs, r); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      else 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        log_info(LD_REND, "Not adding router '%s' to list of responsible " 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                 "hidden service directories, because we have no way of " 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                 "reaching it.", r->nickname); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       if (++n_added == REND_NUMBER_OF_CONSECUTIVE_REPLICAS) 
														 | 
														
														 | 
														
															       if (++n_added == REND_NUMBER_OF_CONSECUTIVE_REPLICAS) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        return 0; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        break; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if (++i == smartlist_len(c->routerstatus_list)) 
														 | 
														
														 | 
														
															     if (++i == smartlist_len(c->routerstatus_list)) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       i = 0; 
														 | 
														
														 | 
														
															       i = 0; 
														 |