[tor-bugs] #7464 [Tor]: run_scheduled_events() has funny-looking operator

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Nov 12 20:08:36 UTC 2012


#7464: run_scheduled_events() has funny-looking operator
--------------------+-------------------------------------------------------
 Reporter:  arma    |          Owner:     
     Type:  defect  |         Status:  new
 Priority:  normal  |      Milestone:     
Component:  Tor     |        Version:     
 Keywords:          |         Parent:     
   Points:          |   Actualpoints:     
--------------------+-------------------------------------------------------
 In git show df9b7646 we have
 {{{
 @@ -1161,11 +1161,11 @@ run_scheduled_events(time_t now)
      if (router_rebuild_descriptor(1)<0) {
        log_info(LD_CONFIG, "Couldn't rebuild router descriptor");
      }
 -    if (advertised_server_mode())
 +    if (advertised_server_mode() & !options->DisableNetwork)
        router_upload_dir_desc_to_dirservers(0);
    }
 }}}

 which is probably not the operator we want. Reported by 'ultramage' on
 irc.

 It *looks* like there's no actual impact from this bug, since both of
 those parameters are either-0-or-1. Still, probably good to fix.

 Do we fix in 0.2.3 (because that's where we introduced the bug) or in
 0.2.4 (because it's not really a bug)?

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7464>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list