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

[tor-bugs] #32408 [Core Tor/Tor]: Handle options_act_reversible() in new config system.



#32408: Handle options_act_reversible() in new config system.
-------------------------------+--------------------------------
     Reporter:  nickm          |      Owner:  (none)
         Type:  defect         |     Status:  new
     Priority:  Medium         |  Milestone:  Tor: 0.4.3.x-final
    Component:  Core Tor/Tor   |    Version:
     Severity:  Normal         |   Keywords:
Actual Points:                 |  Parent ID:  #29211
       Points:  1.5            |   Reviewer:  teor
      Sponsor:  Sponsor31-can  |
-------------------------------+--------------------------------
 Our new configuration system needs to handle options_act_reversible too.

 But on further examination, there are only two actual "reversible" pieces
 of options_act_reversible:

    * Adjusting the logs.
    * Adjusting the listeners.

 The remainder of the function is all about handling "irreversible",
 immutable options that need to be handled before we can mess with the logs
 or listeners.

 I think this means that we want to split this function into two pieces:
 one part that handles startup-only initialization, and one that handles
 truly reversible option changes.

 I think that the callback for the startup-only initialization should be
 called options_set_init(), options_set_onece(), options_set_early(), or
 something like that.

 The callbacks for truly reversible options should look something like
 this:
 {{{
 int act_reversible(const void *old_options, void *new_options, void
 **transaction_state_out);
 int commit(const void *old_options, void *new_options, void
 *transaction_state);
 int rollback(const void *old_options, void *rejected_options, void
 *transaction_state);
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32408>
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