Loading src/or/rendservice.c +21 −4 Original line number Diff line number Diff line Loading @@ -342,6 +342,22 @@ rend_service_get_by_pk_digest(const char* digest) return NULL; } /** Return 1 if any virtual port in <b>service</b> wants a circuit * to have good uptime. Else return 0. */ static int rend_service_requires_uptime(rend_service_t *service) { int i; rend_service_port_config_t *p; for (i=0; i < smartlist_len(service->ports); ++i) { p = smartlist_get(service->ports, i); if (smartlist_string_num_isin(get_options()->LongLivedPorts, p->virtual_port)) return 1; } return 0; } /****** * Handle cells ******/ Loading Loading @@ -458,7 +474,8 @@ rend_service_introduce(circuit_t *circuit, const char *request, size_t request_l /* Launch a circuit to alice's chosen rendezvous point. */ for (i=0;i<MAX_REND_FAILURES;i++) { launched = circuit_launch_by_nickname(CIRCUIT_PURPOSE_S_CONNECT_REND, rp_nickname, 0, 1); launched = circuit_launch_by_nickname(CIRCUIT_PURPOSE_S_CONNECT_REND, rp_nickname, rend_service_requires_uptime(service), 1); if (launched) break; } Loading Loading
src/or/rendservice.c +21 −4 Original line number Diff line number Diff line Loading @@ -342,6 +342,22 @@ rend_service_get_by_pk_digest(const char* digest) return NULL; } /** Return 1 if any virtual port in <b>service</b> wants a circuit * to have good uptime. Else return 0. */ static int rend_service_requires_uptime(rend_service_t *service) { int i; rend_service_port_config_t *p; for (i=0; i < smartlist_len(service->ports); ++i) { p = smartlist_get(service->ports, i); if (smartlist_string_num_isin(get_options()->LongLivedPorts, p->virtual_port)) return 1; } return 0; } /****** * Handle cells ******/ Loading Loading @@ -458,7 +474,8 @@ rend_service_introduce(circuit_t *circuit, const char *request, size_t request_l /* Launch a circuit to alice's chosen rendezvous point. */ for (i=0;i<MAX_REND_FAILURES;i++) { launched = circuit_launch_by_nickname(CIRCUIT_PURPOSE_S_CONNECT_REND, rp_nickname, 0, 1); launched = circuit_launch_by_nickname(CIRCUIT_PURPOSE_S_CONNECT_REND, rp_nickname, rend_service_requires_uptime(service), 1); if (launched) break; } Loading