[tor-commits] [tor/master] Document that subsystem callbacks are optional.

nickm at torproject.org nickm at torproject.org
Fri Nov 9 20:01:54 UTC 2018


commit 61695e3d622dfcc196b8b829842f2b12fecebeab
Author: Nick Mathewson <nickm at torproject.org>
Date:   Fri Nov 9 10:58:20 2018 -0500

    Document that subsystem callbacks are optional.
---
 src/lib/subsys/subsys.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/subsys/subsys.h b/src/lib/subsys/subsys.h
index 462314567..2452ec6e2 100644
--- a/src/lib/subsys/subsys.h
+++ b/src/lib/subsys/subsys.h
@@ -14,7 +14,11 @@ struct dispatch_connector_t;
  * A subsystem is a part of Tor that is initialized, shut down, configured,
  * and connected to other parts of Tor.
  *
- * Subsystems
+ * All callbacks are optional -- if a callback is set to NULL, the subsystem
+ * manager will treat it as a no-op.
+ *
+ * You should use c99 named-field initializers with this structure: we
+ * will be adding more fields, often in the middle of the structure.
  **/
 typedef struct subsys_fns_t {
   /**





More information about the tor-commits mailing list