Re: [tor-bugs] #25914 [Core Tor/Tor]: dirserv: Remove dead code

2018-05-03 Thread Tor Bug Tracker & Wiki
#25914: dirserv: Remove dead code
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:  closed
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dirauth, deadcode, easy, 034 |  implemented
  -roadmap-subtask   |  Actual Points:
Parent ID:   | Points:
 Reviewer:  mikeperry|Sponsor:
-+-
Changes (by nickm):

 * status:  merge_ready => closed
 * resolution:   => implemented


Comment:

 merged! Thanks for the code and for the review!

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25914 [Core Tor/Tor]: dirserv: Remove dead code

2018-05-03 Thread Tor Bug Tracker & Wiki
#25914: dirserv: Remove dead code
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:
 |  merge_ready
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dirauth, deadcode, easy, 034 |  Actual Points:
  -roadmap-subtask   |
Parent ID:   | Points:
 Reviewer:  mikeperry|Sponsor:
-+-
Changes (by mikeperry):

 * status:  needs_review => merge_ready


Comment:

 lgtm; is clearly dead code (I assume this means no changes file).

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25914 [Core Tor/Tor]: dirserv: Remove dead code

2018-05-01 Thread Tor Bug Tracker & Wiki
#25914: dirserv: Remove dead code
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dirauth, deadcode, easy, 034 |  Actual Points:
  -roadmap-subtask   |
Parent ID:   | Points:
 Reviewer:  mikeperry|Sponsor:
-+-
Changes (by dgoulet):

 * parent:  #25610 =>


Comment:

 Turns out it has nothing to do with dirauth modularization. Unparenting.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25914 [Core Tor/Tor]: dirserv: Remove dead code

2018-04-30 Thread Tor Bug Tracker & Wiki
#25914: dirserv: Remove dead code
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dirauth, deadcode, easy, 034 |  Actual Points:
  -roadmap-subtask   |
Parent ID:  #25610   | Points:
 Reviewer:  mikeperry|Sponsor:
-+-
Changes (by dgoulet):

 * reviewer:  isis => mikeperry


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25914 [Core Tor/Tor]: dirserv: Remove dead code

2018-04-25 Thread Tor Bug Tracker & Wiki
#25914: dirserv: Remove dead code
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dirauth, deadcode, easy, 034 |  Actual Points:
  -roadmap-subtask   |
Parent ID:  #25610   | Points:
 Reviewer:   |Sponsor:
-+-
Changes (by dgoulet):

 * status:  assigned => needs_review


Comment:

 See branch: `ticket25914_034_01`

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

[tor-bugs] #25914 [Core Tor/Tor]: dirserv: Remove dead code

2018-04-25 Thread Tor Bug Tracker & Wiki
#25914: dirserv: Remove dead code
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:  assigned
 Priority:  Medium   |  Milestone:  Tor: 0.3.4.x-final
Component:  Core |Version:
  Tor/Tor|   Keywords:  tor-dirauth, deadcode, easy, 034
 Severity:  Normal   |  -roadmap-subtask
Actual Points:   |  Parent ID:  #25610
   Points:   |   Reviewer:
  Sponsor:   |
-+-
 While working on #25610, I've noticed dead code that uses
 `dirserv_get_consensus()`.

 In `networkstatus.c`, function `networkstatus_set_current_consensus()`:

 We parse the flavor and if it is unknown, we bail early with:

 {{{
   if (flav < 0) {
 /*  we don't handle unrecognized flavors yet. */
 log_warn(LD_BUG, "Unrecognized consensus flavor %s", flavor);
 return -2;
   }
 }}}

 But later in the function we have this if/else on the flavor name with a
 `else {}` statement that uses `dirserv_get_consensus()`. But we can't get
 into that else case since the first conditions are the only two flavors we
 can handle.

 In between the first checks above and this if/else ^, the flavor can
 change as in we take the one from the given consensus but again, there is
 a check on if we can handle that flavor:

 {{{
   if (flav != usable_consensus_flavor() &&
   !we_want_to_fetch_flavor(options, flav)) {
 }}}

 Bottom line, I think the `else {}` code is dead code. This simplifies the
 callgraph into the dirauth subsystem.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs