Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#7464 closed defect (fixed)

run_scheduled_events() has funny-looking operator

Reported by: arma Owned by:
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


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)

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)?

Child Tickets

Change History (5)

comment:1 Changed 8 years ago by arma

Keywords: tor-relay added

comment:2 Changed 8 years ago by nickm

My intuition leans towards "0.2.3" because that's where we introduced the bug. It's not really a bug, but it is error-prone. For instance, if we make make options->DisableNetwork an autobool for some crazy bugpatching reason, we'll break this line. If you don't object, please feel free to merge the obvious fix, or ask me to do it.

comment:3 Changed 8 years ago by nickm

Milestone: Tor: 0.2.3.x-final

comment:4 Changed 8 years ago by arma

Resolution: fixed
Status: newclosed


comment:5 Changed 8 years ago by AlexSchoeder

Indeed finally it got fixed, this funny character made me spend a day in this issue. thx for the fix and wish you merry christmas

Note: See TracTickets for help on using tickets.