[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #21345 [Core Tor/Tor]: Do relays count dir reqs as completed before they're complete?



#21345: Do relays count dir reqs as completed before they're complete?
--------------------------+------------------------------------
 Reporter:  arma          |          Owner:
     Type:  task          |         Status:  new
 Priority:  Medium        |      Milestone:  Tor: 0.3.1.x-final
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------

Comment (by arma):

 Ah ha. Current theory for why it works as intended:
 geoip_change_dirreq_state() has to be called in every intermediate step
 before DIRREQ_CHANNEL_BUFFER_FLUSHED, in order, else it will never run the
 clauses at the end:

 {{{
   if (new_state == DIRREQ_IS_FOR_NETWORK_STATUS)
     return;
   if (new_state - 1 != ent->state)
     return;
   ent->state = new_state;
 }}}

 So that's a call with new_state DIRREQ_FLUSHING_DIR_CONN_FINISHED, and
 another with new_state DIRREQ_END_CELL_SENT, and another with new_state
 DIRREQ_CIRC_QUEUE_FLUSHED, and only then will it care when it receives a
 call with new_state DIRREQ_CHANNEL_BUFFER_FLUSHED. Sneaky.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21345#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs