]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Argh. The unset value for OwningControllerFD is NOT -1.
authorNick Mathewson <nickm@torproject.org>
Tue, 16 Oct 2018 21:57:00 +0000 (17:57 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 16 Oct 2018 21:57:04 +0000 (17:57 -0400)
src/core/mainloop/mainloop.c

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