Argh. The unset value for OwningControllerFD is NOT -1.

This commit is contained in:
Nick Mathewson 2018-10-16 17:57:00 -04:00
parent 56a3cef4d7
commit e97adaf8dc

View File

@ -1503,7 +1503,7 @@ get_my_roles(const or_options_t *options)
* requires tor to have basic functionnalities. */ * requires tor to have basic functionnalities. */
int is_client = options_any_client_port_set(options) || int is_client = options_any_client_port_set(options) ||
options->ControlPort_set || options->ControlPort_set ||
options->OwningControllerFD >= 0; options->OwningControllerFD != UINT64_MAX;
if (is_bridge) roles |= PERIODIC_EVENT_ROLE_BRIDGE; if (is_bridge) roles |= PERIODIC_EVENT_ROLE_BRIDGE;
if (is_client) roles |= PERIODIC_EVENT_ROLE_CLIENT; if (is_client) roles |= PERIODIC_EVENT_ROLE_CLIENT;